Function at 0x2254dd0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x40
mov eax, dword [esp + 0x48]
xor ecx, ecx
mov dword [esp + 0x20], ecx
push ebx
mov dword [esp + 0x28], ecx
push ebp
mov ebp, dword [eax + 8]
mov dword [esp + 0x30], ecx
push esi
mov esi, dword [esp + 0x50]
mov eax, dword [esi + 0x460]
mov dword [esp + 0x38], ecx
push edi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
push 1
push ecx
push ecx
push eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x40], 0x20000000
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
or edi, 0xffffffff
cmp ebx, edi
jne 0x2254e3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x2254e3e
mov ebx, edi
mov ecx, dword [esi + 0x44c]
xor edx, edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edx
mov eax, dword [ebp + 0x57c]
mov dword [esp + 0x40], eax
xor eax, eax
cmp ecx, edx
mov dword [esp + 0x44], edi
jle 0x2254e84
mov ecx, dword [esi + 0x45c]
cmp ebp, dword [ecx]
je 0x2254e7c
mov ebx, dword [esi + 0x44c]
inc eax
add ecx, 4
cmp eax, ebx
jl 0x2254e68
jmp 0x2254e84
cmp eax, edi
mov dword [esp + 0x44], eax
jne 0x2254e96
or dword [esi + 0x468], 0x100
mov dword [esp + 0x10], 0x49c
mov eax, dword [esi + 0x460]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
lea ecx, [esp + 0x58]
push ecx
mov dword [esp + 0x5c], edx
push 0x20
lea edx, [esp + 0x3c]
push edx
push eax
mov dword [esp + 0x5c], edi
call ebx
test eax, eax
je 0x2254ec5
cmp dword [esp + 0x54], 0x20
je 0x2254ecd
mov dword [esp + 0x10], 0x46b
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov eax, dword [ebp + 0x578]
mov dword [esp + 0x54], 0
jne 0x22551a0
lea edi, [eax + 0xa8]
mov dword [esp + 0x14], edi
jmp 0x2254f00
mov ebp, dword [esp + 0x1c]
jmp 0x2254f00
mov eax, dword [esp + 0x54]
cmp eax, dword [ebp + 0x57c]
jge 0x2255198
mov eax, dword [esi + 0x460]
push 1
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x2254f36
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x2254f36
or ebp, ebp
mov eax, dword [edi - 0x28]
cmp eax, 2
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], ecx
je 0x2254fd0
cmp eax, 0x12
jle 0x2254f5c
cmp eax, 0x14
jle 0x2254fd0
mov edi, dword [edi - 0x20]
mov edx, dword [esp + 0x38]
xor ebp, ebp
push ebp
lea ecx, [esp + 0x1c]
push ecx
lea eax, [edx + edi + 0x10]
push 0x10
lea edx, [esp + 0x2c]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x460]
push edx
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x40], ebp
mov dword [esp + 0x2c], ebp
call ebx
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx + 0x3c]
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
push ebp
lea edx, [esp + 0x1c]
push edx
add eax, ecx
mov ecx, dword [esi + 0x460]
push edi
push eax
push ecx
mov dword [esp + 0x2c], ebp
call ebx
test eax, eax
jne 0x2254fc3
mov edi, dword [esp + 0x14]
or eax, 0xffffffff
jmp 0x22550dc
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
jmp 0x22550dc
mov ecx, dword [esp + 0x58]
mov eax, dword [edi]
mov edx, dword [ecx + 0x3c]
mov ebp, dword [eax + edx]
test ebp, ebp
je 0x2255077
push 1
push ebp
call fcn.02267c30
add esp, 8
test eax, eax
je 0x2255077
cmp dword [edi - 0x28], 0x13
je 0x225500c
push ebp
call fcn.0226b228
add esp, 4
lea edi, [eax + eax + 2]
jmp 0x2255012
mov edi, dword [ebp]
add edi, 4
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
or edx, 1
push 0
mov dword [esp + 0x30], edx
lea edx, [esp + 0x1c]
push edx
lea ecx, [eax + edi + 0x10]
push 0x10
lea eax, [esp + 0x2c]
mov dword [esp + 0x44], ecx
mov ecx, dword [esi + 0x460]
push eax
push ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], 0
call ebx
mov eax, dword [esi + 0x460]
push 0
lea edx, [esp + 0x1c]
push edx
push edi
push ebp
push eax
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
jne 0x2254fc3
mov edi, dword [esp + 0x14]
or eax, 0xffffffff
jmp 0x22550dc
mov ebp, dword [esp + 0x38]
mov edx, dword [esi + 0x460]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x10
lea ecx, [esp + 0x2c]
push ecx
add ebp, 0x14
push edx
mov dword [esp + 0x34], 4
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x2c], 0
call ebx
mov ecx, dword [esp + 0x58]
mov ebp, dword [ecx + 0x3c]
mov eax, dword [edi]
mov ecx, dword [esi + 0x460]
push 0
lea edx, [esp + 0x1c]
push edx
push 4
add eax, ebp
push eax
push ecx
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
jne 0x22550d8
or eax, 0xffffffff
jmp 0x22550dc
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
jne 0x22550ee
mov dword [esp + 0x10], 0x46b
jmp 0x2255177
mov eax, dword [esi + 0x460]
push 1
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x2255114
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x2255114
or ebp, ebp
mov ecx, dword [esp + 0x34]
mov eax, dword [esi + 0x460]
push 0
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2255135
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x460]
push 0
lea edx, [esp + 0x1c]
push edx
push 0x20
lea eax, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x2c], 0
call ebx
mov eax, dword [esi + 0x460]
push 0
push 0
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2255171
call dword [sym.imp.KERNEL32.dll_GetLastError]
inc dword [esi + 0x458]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x10]
inc edx
add edi, 0xc8
test eax, eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x14], edi
je 0x2254ef3
jmp 0x22551a0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x22551aa
or dword [esi + 0x468], 0x100
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret