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

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
push 1
call fcn.00408ff0
add esp, 4
xor esi, esi
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], esi
mov ebx, 0x300
mov eax, dword [esp + 0x30]
cmp eax, esi
je 0x403aa0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x403c11
test bh, 1
je 0x403b15
mov edx, dword [esp + 0x3c]
mov eax, 0x80020
xor ecx, ecx
sub eax, ebp
cmp ecx, edx
mov dword [esp + 0x10], eax
jl 0x403aca
jg 0x403ac2
cmp eax, dword [esp + 0x38]
jbe 0x403aca
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
cmp eax, esi
jbe 0x403b15
lea ecx, [esp + 0x14]
push esi
push ecx
push eax
mov eax, dword [esp + 0x40]
lea edx, [ebp + 0x4c1734]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403c1e
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jne 0x403c2b
mov ecx, dword [esp + 0x38]
add ebp, eax
sub ecx, eax
mov eax, dword [esp + 0x3c]
sbb eax, esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
push 0x441734
push 0x4c1734
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], 0x80000
call fcn.00409030
mov ebx, eax
add esp, 0x10
test bl, bl
jne 0x403c38
mov eax, dword [esp + 0x18]
cmp eax, esi
jbe 0x403bde
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x14]
push esi
push ecx
push eax
push 0x441734
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403c4e
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jne 0x403c5b
lea ecx, [esp + 0x1c]
push ecx
push eax
push 0x441734
call fcn.00403d20
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
add esp, 0xc
add edi, edx
adc ecx, esi
mov esi, dword [esp + 0x2c]
test esi, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
je 0x403bde
push 0
mov edx, ecx
push 0x64
push edx
push edi
call fcn.00412980
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x48]
push ecx
push edx
push eax
call fcn.004128d0
push eax
push 0
push 0x405
push esi
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x10]
sub ebp, eax
je 0x403c05
mov ecx, ebp
lea esi, [eax + 0x4c1734]
mov eax, ecx
mov edi, 0x4c1734
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x20]
test bh, 4
jne 0x403c68
xor esi, esi
jmp 0x403a88
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
mov eax, 0x90018001
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
mov eax, 0x90028001
pop ebx
add esp, 0x18
ret
and ebx, 0xff
pop edi
or ebx, 0x90039000
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
mov eax, 0x90048002
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
mov eax, 0x90058002
pop ebx
add esp, 0x18
ret
test ebp, ebp
je 0x403c79
pop edi
pop esi
pop ebp
mov eax, 0x90068005
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
or eax, ecx
je 0x403c92
pop edi
pop esi
pop ebp
mov eax, 0x90078005
pop ebx
add esp, 0x18
ret
cmp edi, dword [esp + 0x44]
jne 0x403ca4
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x48]
cmp ecx, eax
je 0x403cb1
pop edi
pop esi
pop ebp
mov eax, 0x90088005
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x14]
mov esi, 4
push 0
push edx
push esi
push 0x4c1734
push eax
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403ce3
pop edi
pop esi
pop ebp
mov eax, 0x90098005
pop ebx
add esp, 0x18
ret
cmp dword [esp + 0x14], esi
je 0x403cf6
pop edi
pop esi
pop ebp
mov eax, 0x900a8005
pop ebx
add esp, 0x18
ret
mov eax, dword [0x4c1734]
mov esi, dword [esp + 0x1c]
sub eax, esi
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
and eax, 0x900b8005
pop ebx
add esp, 0x18
ret