Function at 0x2254640
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor edx, edx
mov dword [esp + 0x10], edx
push ebp
push esi
mov esi, dword [esp + 0x60]
mov eax, dword [esi + 0x460]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
push edi
mov dword [esp + 0x28], edx
push 1
xor ebp, ebp
mov dword [esp + 0x30], edx
push ebp
mov dword [esp + 0x38], edx
push ebp
mov dword [esp + 0x40], edx
push eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x2c], 0x10000000
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x22546ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x22546ac
or edi, edi
mov ecx, dword [esp + 0x6c]
mov ecx, dword [ecx + 0x14]
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x68]
mov eax, dword [edi + 0x14]
lea edx, [ecx + eax]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x44c]
mov dword [esp + 0x34], eax
xor eax, eax
cmp ecx, ebp
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], 0xffffffff
jle 0x2254711
mov ecx, dword [esi + 0x45c]
nop
mov edx, dword [esp + 0x14]
cmp edx, dword [ecx]
je 0x2254708
mov edx, dword [esi + 0x44c]
inc eax
add ecx, 4
cmp eax, edx
jl 0x22546f0
jmp 0x2254711
cmp eax, 0xffffffff
mov dword [esp + 0x30], eax
jne 0x225472f
mov eax, dword [esi + 0x468]
or eax, 0x100
pop edi
mov dword [esi + 0x468], eax
pop esi
pop ebp
mov eax, 0x49c
pop ebx
add esp, 0x50
ret
mov eax, dword [esi + 0x460]
push ebp
lea ecx, [esp + 0x68]
push ecx
push 0x20
lea edx, [esp + 0x28]
push edx
push eax
mov dword [esp + 0x78], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x2254758
cmp dword [esp + 0x64], 0x20
je 0x2254776
mov eax, dword [esi + 0x468]
or eax, 0x100
pop edi
mov dword [esi + 0x468], eax
pop esi
pop ebp
mov eax, 0x46b
pop ebx
add esp, 0x50
ret
mov edi, dword [edi + 0x18]
mov dword [esp + 0x64], ebp
lea ecx, [ecx]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
cmp ecx, dword [eax + 0x14]
jge 0x22548bc
mov eax, dword [edi + 0x14]
mov ecx, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edx
push 1
add eax, 0x24
mov dword [esp + 0x54], edx
push ebp
add ecx, eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x460]
push ebp
mov dword [esp + 0x64], edx
push eax
mov dword [esp + 0x6c], edx
mov dword [esp + 0x34], ecx
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x22547eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x22547eb
or ebx, ebx
mov eax, dword [edi]
mov ecx, dword [edi + 4]
lea edx, [esp + 0x4c]
mov dword [esp + 0x44], eax
mov eax, dword [edi + 8]
push edx
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x4c], ebx
call fcn.0225d9c0
mov ecx, dword [edi + 0x18]
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
add esp, 0xc
push ebp
mov dword [esp + 0x58], edx
mov edx, dword [edi + 0x20]
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x64], edx
push 0x24
lea edx, [esp + 0x48]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x460]
push edx
push eax
mov dword [esp + 0x2c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x225488c
cmp dword [esp + 0x18], 0x24
jne 0x225488c
mov edx, dword [edi + 0x14]
cmp edx, ebp
jle 0x225489e
mov eax, dword [edi + 0xc]
mov ecx, dword [esi + 0x460]
push ebp
lea ebx, [esp + 0x1c]
push ebx
push edx
push eax
push ecx
mov dword [esp + 0x2c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x2254883
or eax, 0xffffffff
jmp 0x2254887
mov eax, dword [esp + 0x18]
cmp eax, dword [edi + 0x14]
je 0x225489e
or dword [esi + 0x468], 0x100
mov dword [esp + 0x10], 0x46b
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc edx
add edi, 0x30
cmp eax, ebp
mov dword [esp + 0x64], edx
je 0x2254780
mov eax, dword [esp + 0x6c]
mov edi, dword [eax + 0x18]
cmp dword [esp + 0x10], ebp
mov dword [esp + 0x64], ebp
jne 0x2254a1e
jmp 0x22548e0
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea esp, [esp]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x64]
cmp ecx, dword [edx + 0x14]
jge 0x2254a18
mov ecx, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0x14]
push 1
add eax, 0x24
push ebp
add ecx, eax
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x460]
push ebp
push eax
mov dword [esp + 0x34], ecx
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x225494b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x225494b
or ebx, ebx
mov ecx, dword [edi]
mov edx, dword [edi + 4]
lea eax, [esp + 0x4c]
mov dword [esp + 0x44], ecx
mov ecx, dword [edi + 8]
push eax
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x4c], ebx
call fcn.0225d9c0
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x18]
add esp, 0xc
push ebp
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x60], edx
push 0x24
lea edx, [esp + 0x48]
mov dword [esp + 0x68], eax
mov eax, dword [esi + 0x460]
push edx
push eax
mov dword [esp + 0x7c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x22549ec
cmp dword [esp + 0x68], 0x24
jne 0x22549ec
mov edx, dword [edi + 0x14]
cmp edx, ebp
jle 0x22549fe
mov eax, dword [edi + 0xc]
mov ecx, dword [esi + 0x460]
push ebp
lea ebx, [esp + 0x6c]
push ebx
push edx
push eax
push ecx
mov dword [esp + 0x7c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x22549e3
or eax, 0xffffffff
jmp 0x22549e7
mov eax, dword [esp + 0x68]
cmp eax, dword [edi + 0x14]
je 0x22549fe
or dword [esi + 0x468], 0x100
mov dword [esp + 0x10], 0x46b
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x10]
inc edx
add edi, 0x30
cmp eax, ebp
mov dword [esp + 0x64], edx
je 0x22548d3
jmp 0x2254a1e
cmp dword [esp + 0x10], ebp
je 0x2254a3b
mov eax, dword [esi + 0x468]
or eax, 0x100
pop edi
mov dword [esi + 0x468], eax
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
mov eax, dword [esi + 0x460]
push 1
push ebp
push ebp
push eax
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x2254a5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x2254a5b
or edi, edi
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + 0x460]
push ebp
push ebp
push ecx
push eax
call ebx
cmp eax, 0xffffffff
jne 0x2254a76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x460]
push ebp
lea edx, [esp + 0x6c]
push edx
push 0x20
lea eax, [esp + 0x28]
push eax
push ecx
mov dword [esp + 0x7c], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x460]
push ebp
push ebp
push edi
push eax
call ebx
cmp eax, 0xffffffff
jne 0x2254aab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x450]
inc eax
pop edi
mov dword [esi + 0x450], eax
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x50
ret