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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x14], 1
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov edx, dword [0x41d0b0]
and edx, 0x1000
neg edx
sbb edx, edx
inc edx
mov dword [0x428bd4], edx
mov dword [0x42cfe4], 0
cmp dword [ebp - 0xc], 0
je 0x404ed8
cmp dword [ebp - 0xc], 0x4000
jbe 0x404d34
mov dword [ebp - 0x20], 0x4000
jmp 0x404d3a
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0x14]
and eax, 0x2000000
test eax, eax
je 0x404d7b
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push 0x428be0
call fcn.0040c6b0
add esp, 0xc
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], ecx
jmp 0x404d94
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
push 0x428be0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 8]
je 0x404da8
mov dword [ebp - 0x14], 0
jmp 0x404ed8
mov eax, dword [ebp + 0x14]
and eax, 0x8002000
test eax, eax
je 0x404dcf
mov ecx, dword [ebp + 0x14]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 0x428be0
call fcn.0040c040
add esp, 0xc
cmp dword [0x41d054], 0
je 0x404e0d
mov eax, dword [ebp - 0x18]
push eax
push 0x428be0
call dword [0x41d054]
add esp, 8
test eax, eax
jne 0x404e0d
mov dword [0x41d0b0], 0
cmp dword [0x42cfe4], 0
je 0x404e0d
mov dword [ebp - 0x14], 0
jmp 0x404ed8
mov ecx, dword [ebp + 0x14]
and ecx, 0x8000
test ecx, ecx
je 0x404e35
cmp dword [0x41d0ac], 0
je 0x404e35
mov edx, dword [ebp - 0x18]
push edx
push 0x428be0
call dword [0x41d0ac]
add esp, 8
mov eax, dword [ebp + 0x14]
and eax, 0xff
test eax, eax
je 0x404e69
mov ecx, dword [ebp + 0x14]
and ecx, 0x2000
test ecx, ecx
jne 0x404e69
mov edx, dword [ebp + 0x14]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x18]
push eax
push 0x428be0
call fcn.0040c040
add esp, 0xc
mov ecx, dword [ebp + 0x14]
and ecx, 0x1000000
test ecx, ecx
je 0x404e9c
mov edx, dword [ebp - 8]
push edx
push 0x428be0
mov eax, dword [ebp - 0x10]
push eax
call fcn.0040c6b0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 4], edx
jmp 0x404eb5
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0x428be0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
je 0x404ed3
mov dword [ebp - 0x14], 0
jmp 0x404ed8
jmp 0x404d18
mov dword [0x41d0b4], 0
cmp dword [0x428bd4], 0
jne 0x404ef2
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret