Function at 0x484830
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x814
push ebx
push ebp
push esi
mov esi, dword [esp + 0x82c]
push edi
mov edi, 0xa
test byte [esi + 0x5735], 0x40
mov eax, dword [esi + 0xa8]
mov dword [esp + 0x10], edi
je 0x484a00
cmp eax, 0xffffffff
je 0x4849ef
mov ecx, dword [esp + 0x82c]
xor ebp, ebp
cmp ecx, ebp
je 0x4849ef
cmp dword [ecx], 0xffffffff
je 0x4849ef
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x4849ef
mov eax, dword [esi + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4849ef
mov eax, dword [esi + 0x8b4]
mov dword [esp + 0x10], ebp
cmp eax, ebp
jne 0x4848ef
test byte [esi + 0x5735], 0x10
je 0x4848c3
cmp dword [esi + 0x5738], ebp
jbe 0x4848ef
lea ecx, [esi + 0xac]
lea edx, [esp + 0x24]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [esi + 0x5738]
lea eax, [esp + 0x24]
push esi
push eax
inc ecx
push ebp
push ecx
push ebp
push 0xe
call fcn.004842a0
add esp, 0x18
mov edx, dword [esi + 0x8b0]
mov ecx, dword [esi + 0x5738]
inc edx
lea ebx, [esi + 0xac]
inc ecx
push 0x2e
push ebx
mov dword [esi + 0x8b0], edx
mov dword [esi + 0x5738], ecx
call fcn.00483480
cmp eax, ebp
je 0x4849ef
mov ecx, dword [esi + 0x5738]
inc eax
inc ecx
cmp ecx, 0x64
push ecx
jae 0x484934
push str.z_02d
jmp 0x484939
push str._03d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebp
push 0x80
push 2
push ebp
push 1
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0xa8], eax
jne 0x484969
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x828]
mov dword [esi + 0x5700], ebp
mov dword [esi + 0x5758], ebp
cmp eax, ebp
mov dword [esi + 0x5704], ebp
mov dword [esi + 0x575c], ebp
je 0x4849a3
cmp dword [esi + 0x5768], ebp
jne 0x4849a3
mov dword [eax + 0x40], ebp
mov dword [eax + 0x44], ebp
mov edx, dword [esi + 0x5738]
mov dword [eax + 0x30], edx
cmp dword [esi + 0x5768], ebp
je 0x4849ca
mov eax, dword [esp + 0x10]
mov dword [esi + 0x8b8], 0x200000
mov dword [esi + 0x8bc], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x814
ret
push esi
push ebx
call fcn.00482af0
add esp, 8
mov dword [esi + 0x8b8], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x8bc], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x814
ret
mov dword [esp + 0x10], edi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x814
ret
cmp eax, 0xffffffff
je 0x484bce
mov ecx, dword [esp + 0x82c]
xor ebp, ebp
cmp ecx, ebp
je 0x484bce
cmp dword [ecx], 0xffffffff
je 0x484bce
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x484bce
mov eax, dword [esi + 0xa8]
push 2
push ebp
push ebp
push eax
call fcn.0047e6b0
mov ebx, edx
add esp, 0x10
cmp ebx, ebp
mov dword [esp + 0x14], eax
jg 0x484a5b
jl 0x484a55
cmp eax, ebp
jae 0x484a5b
mov dword [esp + 0x14], ebp
xor ebx, ebx
mov ecx, dword [esi + 0xa8]
push ebp
push ebp
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x484b8f
push 0x7800
mov dword [esp + 0x14], ebp
call fcn.004adbfa
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x484a92
mov dword [esp + 0x10], 4
mov edx, dword [esi + 0x4ea8]
push esi
push edx
call fcn.00482af0
add esp, 8
cmp edx, ebx
jl 0x484b6e
jg 0x484ab6
cmp eax, dword [esp + 0x14]
jb 0x484b6e
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x484b72
test ebx, ebx
jl 0x484b72
jg 0x484ad8
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x484b72
push esi
call fcn.00474890
add esp, 4
test eax, eax
jne 0x484b64
mov ecx, dword [esi + 0xa8]
push eax
lea eax, [esp + 0x24]
push eax
push 0x7800
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x484b6e
mov eax, dword [esp + 0x20]
test eax, eax
mov edi, eax
jne 0x484b19
mov dword [esp + 0x14], eax
xor ebx, ebx
mov edi, 0xa
jmp 0x484ac2
lea edx, [esp + 0x1c]
push 0
push edx
push eax
mov eax, dword [esp + 0x838]
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x484b55
cmp dword [esp + 0x1c], edi
jne 0x484b55
mov ecx, dword [esp + 0x14]
mov eax, edi
cdq
sub ecx, eax
mov edi, 0xa
mov dword [esp + 0x14], ecx
sbb ebx, edx
jmp 0x484ac2
mov dword [esp + 0x10], 0xa
mov edi, 0xa
jmp 0x484b72
mov dword [esp + 0x10], 9
jmp 0x484b72
mov dword [esp + 0x10], edi
mov edx, dword [esp + 0x82c]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test ebp, ebp
je 0x484b8f
push ebp
call fcn.004ad74d
add esp, 4
mov ecx, dword [esi + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x484bca
push 0
push 0x80
push 2
push 0
push 1
lea edx, [esi + 0xac]
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0xa8], eax
jne 0x484bce
mov dword [esp + 0x10], edi
mov eax, dword [esi + 0x4ea8]
push esi
push eax
call fcn.00482af0
add esp, 8
test edx, edx
jg 0x484c0b
jl 0x484be8
test eax, eax
ja 0x484c0b
mov ecx, dword [esp + 0x82c]
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
push 0
call fcn.00483e80
add esp, 0x14
test eax, eax
je 0x484c0b
mov dword [esp + 0x10], 9
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x814
ret