Function at 0x422190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x5bd254]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
cmp dword [ebp + 8], 0x6a2be0
jne 0x4221c1
call sym.convertifd.exe_FlushAllPagesToDisk
test eax, eax
jne 0x4221c1
mov eax, 0xfffffffa
jmp 0x422656
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x120]
add esi, 0x70
mov ecx, 0x6e
lea edi, [ebp - 0x5b8]
rep movsd dword es:[edi], dword [esi]
cmp dword [0x6a270c], 0
je 0x4221fb
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 0x120]
add edi, 0x70
mov ecx, 0x6e
mov esi, 0x6a2710
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x198]
push edx
mov eax, dword [ebp + 8]
push eax
call sym.convertifd.exe_UtGetPath
add esp, 8
lea ecx, [ebp - 0x2f8]
push ecx
mov edx, dword [ebp + 8]
push edx
call sym.convertifd.exe_UtGetName
add esp, 8
lea eax, [ebp - 0x2f8]
push eax
lea ecx, [ebp - 0x198]
push ecx
call fcn.00513680
add esp, 8
lea edx, [ebp - 0x198]
push edx
lea eax, [ebp - 0x400]
push eax
call fcn.00513670
add esp, 8
push 0x5a83c0
lea ecx, [ebp - 0x198]
push ecx
call fcn.00513680
add esp, 8
push str..bak
lea edx, [ebp - 0x400]
push edx
call fcn.00513680
add esp, 8
push 0x88
push 0
lea eax, [ebp - 0x90]
push eax
call fcn.00511e90
add esp, 0xc
mov byte [ebp - 0x90], 0x88
push 0x4000
lea ecx, [ebp - 0x90]
push ecx
lea edx, [ebp - 0x400]
push edx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
je 0x422309
push 0x88
push 0
lea eax, [ebp - 0x90]
push eax
call fcn.00511e90
add esp, 0xc
mov byte [ebp - 0x90], 0x88
push 2
lea ecx, [ebp - 0x90]
push ecx
lea edx, [ebp - 0x400]
push edx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov dword [ebp - 0x5c0], eax
cmp dword [ebp - 0x5c0], 0xffffffff
jne 0x4222fc
mov eax, 0xfffffff6
jmp 0x422656
mov eax, dword [ebp - 0x5c0]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
push 0x5a83d0
lea ecx, [ebp - 0x198]
push ecx
call fcn.00515a07
add esp, 8
mov dword [ebp - 0x1ec], eax
cmp dword [ebp - 0x1ec], 0
jne 0x422336
mov eax, 0xfffffff8
jmp 0x422656
mov dword [ebp - 0x5bc], 0
push 0x4c
push 0
lea edx, [ebp - 0x1e8]
push edx
call fcn.00511e90
add esp, 0xc
push 1
lea eax, [ebp - 0x1e8]
push eax
lea ecx, [ebp - 0x5bc]
push ecx
mov edx, dword [ebp - 0x1ec]
push edx
mov eax, dword [ebp + 8]
push eax
call sym.convertifd.exe_SaveIFDData
add esp, 0x14
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x422387
mov eax, dword [ebp - 4]
jmp 0x422656
push 2
push 0
mov ecx, dword [ebp - 0x1ec]
push ecx
call fcn.00515def
add esp, 0xc
mov edx, dword [ebp - 0x1ec]
push edx
call fcn.005158c7
add esp, 4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x104], 0
je 0x4223c7
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x104]
push edx
call fcn.005158c7
add esp, 4
lea eax, [ebp - 0x400]
push eax
call fcn.00511b16
add esp, 4
cmp dword [0x6a2978], 0
je 0x4223e6
mov dword [ebp + 0xc], 0
cmp dword [ebp + 0xc], 0
jne 0x4223fa
mov ecx, dword [ebp + 8]
push ecx
call fcn.00511b16
add esp, 4
jmp 0x42240d
lea edx, [ebp - 0x400]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0051787a
add esp, 8
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x198]
push edx
call fcn.0051787a
add esp, 8
test eax, eax
je 0x422447
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x120]
add edi, 0x70
mov ecx, 0x6e
lea esi, [ebp - 0x5b8]
rep movsd dword es:[edi], dword [esi]
mov eax, 0xfffffff6
jmp 0x422656
cmp dword [0x6a29a0], 0
je 0x4224bf
mov ecx, dword [0x6a29a0]
push ecx
lea edx, [ebp - 0x628]
push edx
call fcn.00513670
add esp, 8
mov eax, dword [0x6a29a0]
push eax
call sym.convertifd.exe_IpFree
add esp, 4
mov dword [0x6a29a0], 0
lea ecx, [ebp - 0x628]
push ecx
call fcn.00511b16
add esp, 4
lea edx, [ebp - 0x628]
push edx
call sym.convertifd.exe_UtStripExt
add esp, 4
push 0x5a83d4
lea eax, [ebp - 0x628]
push eax
call sym.convertifd.exe_UtAddExt
add esp, 8
lea ecx, [ebp - 0x628]
push ecx
call fcn.00511b16
add esp, 4
cmp dword [ebp + 8], sym.convertifd.exe_i_ifd
jne 0x4224cd
call sym.convertifd.exe_FreeAllPageBuffers
push 0x5a83d8
mov edx, dword [ebp + 8]
push edx
call fcn.00515a07
add esp, 8
mov dword [ebp - 0x1ec], eax
cmp dword [ebp - 0x1ec], 0
jne 0x422510
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x120]
add edi, 0x70
mov ecx, 0x6e
lea esi, [ebp - 0x5b8]
rep movsd dword es:[edi], dword [esi]
mov eax, 0xffffff9c
jmp 0x422656
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x1ec]
mov dword [ecx + 0x104], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x124]
push ecx
call sym.convertifd.exe_UtFTable
add esp, 4
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5bc]
mov dword [edx + 0x124], eax
push 0x4c
lea ecx, [ebp - 0x1e8]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x11c]
push eax
call fcn.005154f0
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x108]
push edx
call fcn.005158c7
add esp, 4
mov eax, dword [ebp + 8]
add eax, 0x1cc
push eax
call fcn.00511b16
add esp, 4
mov ecx, dword [ebp + 8]
add ecx, 0x1cc
push ecx
push 0
push 0x5a83dc
push 0
call sym.convertifd.exe_CfGetTempFileName
add esp, 0x10
push 0x5a83e0
mov edx, dword [ebp + 8]
add edx, 0x1cc
push edx
call fcn.00515a07
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x108], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x108], 0
jne 0x4225e5
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x120]
add edi, 0x70
mov ecx, 0x6e
lea esi, [ebp - 0x5b8]
rep movsd dword es:[edi], dword [esi]
mov eax, 0xfffffff8
jmp 0x422656
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x108]
push edx
push 1
push 0xa
push str._TEMP.IFD_
call fcn.0051646d
add esp, 0x10
cmp eax, 1
je 0x42260c
mov eax, 0xfffffff8
jmp 0x422656
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c0], 0
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 0x120]
add edi, 0x70
mov ecx, 0x6e
lea esi, [ebp - 0x5b8]
rep movsd dword es:[edi], dword [esi]
cmp dword [0x601cd4], 0
je 0x422654
mov edx, dword [0x601cd4]
push edx
call sym.convertifd.exe_FreeGlobalMemory
add esp, 4
mov dword [0x601cd4], 0
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00511a80
mov esp, ebp
pop ebp
ret