Function at 0x641d30
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x6a1a11
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebp
push edi
mov dword [esp + 0xc], ecx
call fcn.00642310
mov eax, dword [esp + 0x54]
xor edi, edi
push edi
push 0x80
push 3
push edi
push edi
push SysReAllocString
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x641d8b
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 4
push ebx
push esi
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
lea ecx, [esp + 0x10]
push edi
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
push ebp
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], edi
call esi
lea eax, [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x20]
push 4
push ecx
push ebp
call esi
mov eax, dword [esp + 0x24]
cmp eax, 1
jne 0x641f9b
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], edi
cmp eax, edi
jle 0x642236
push 0xa24
call fcn.00673b05
mov ebx, eax
add esp, 4
mov dword [esp + 0x1c], ebx
test ebx, ebx
mov dword [esp + 0x54], 0
je 0x641e6c
mov ecx, 0x40
xor eax, eax
mov edi, ebx
lea edx, [ebx + 0x914]
rep stosd dword es:[edi], eax
mov dword [ebx + 0x100], eax
add ebx, 0x514
mov dword [esp + 0x5c], 4
mov ecx, 0x40
xor eax, eax
lea edi, [ebx - 0x410]
add edx, 4
rep stosd dword es:[edi], eax
mov ecx, 0x40
mov edi, ebx
mov dword [edx - 0x414], eax
add ebx, 0x100
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x1c]
mov ecx, 0x40
add edi, 0x924
mov dword [edx - 4], eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x5c]
dec eax
mov dword [esp + 0x5c], eax
jne 0x641e20
mov ebx, dword [esp + 0x1c]
jmp 0x641e6e
xor ebx, ebx
lea edx, [esp + 0x10]
push 0
push edx
push 0x100
push ebx
push ebp
mov dword [esp + 0x68], 0xffffffff
call esi
lea ecx, [esp + 0x10]
push 0
lea eax, [ebx + 0x100]
push ecx
push 4
push eax
push ebp
call esi
lea edi, [ebx + 0x104]
mov dword [esp + 0x5c], 4
lea edx, [esp + 0x10]
push 0
push edx
push 0x100
push edi
push ebp
call esi
mov eax, dword [esp + 0x5c]
add edi, 0x100
dec eax
mov dword [esp + 0x5c], eax
jne 0x641ea7
lea edi, [ebx + 0x504]
mov dword [esp + 0x5c], 4
lea eax, [esp + 0x10]
push 0
push eax
push 4
push edi
push ebp
call esi
mov eax, dword [esp + 0x5c]
add edi, 4
dec eax
mov dword [esp + 0x5c], eax
jne 0x641ed6
lea edi, [ebx + 0x514]
mov dword [esp + 0x5c], 4
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x100
push edi
push ebp
call esi
mov eax, dword [esp + 0x5c]
add edi, 0x100
dec eax
mov dword [esp + 0x5c], eax
jne 0x641eff
lea edi, [ebx + 0x914]
mov dword [esp + 0x5c], 4
lea edx, [esp + 0x10]
push 0
push edx
push 4
push edi
push ebp
call esi
mov eax, dword [esp + 0x5c]
add edi, 4
dec eax
mov dword [esp + 0x5c], eax
jne 0x641f2e
lea eax, [ebx + 0x924]
push 0x6d6294
push eax
call fcn.0067429f
mov eax, dword [ebx + 0x100]
add esp, 8
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x44]
lea edx, [esp + 0x3c]
push ecx
push edx
lea ecx, [eax + 4]
mov dword [esp + 0x50], ebx
call fcn.00642ba0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x641ddc
jmp 0x642236
cmp eax, 2
jne 0x642236
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
cmp eax, edi
jle 0x642236
push 0xa24
call fcn.00673b05
mov ebx, eax
add esp, 4
mov dword [esp + 0x28], ebx
test ebx, ebx
mov dword [esp + 0x54], 1
je 0x642044
mov ecx, 0x40
xor eax, eax
mov edi, ebx
lea edx, [ebx + 0x914]
rep stosd dword es:[edi], eax
mov dword [ebx + 0x100], eax
add ebx, 0x514
mov dword [esp + 0x5c], 4
mov ecx, 0x40
xor eax, eax
lea edi, [ebx - 0x410]
add edx, 4
rep stosd dword es:[edi], eax
mov ecx, 0x40
mov edi, ebx
mov dword [edx - 0x414], eax
add ebx, 0x100
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x28]
mov ecx, 0x40
add edi, 0x924
mov dword [edx - 4], eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x5c]
dec eax
mov dword [esp + 0x5c], eax
jne 0x641ff8
mov edi, dword [esp + 0x28]
jmp 0x642046
xor edi, edi
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x100
push edi
push ebp
mov dword [esp + 0x68], 0xffffffff
call esi
lea edx, [esp + 0x10]
push 0
lea eax, [edi + 0x100]
push edx
push 4
push eax
push ebp
call esi
lea ebx, [edi + 0x104]
mov dword [esp + 0x5c], 4
lea eax, [esp + 0x10]
push 0
push eax
push 0x100
push ebx
push ebp
call esi
mov eax, dword [esp + 0x5c]
add ebx, 0x100
dec eax
mov dword [esp + 0x5c], eax
jne 0x64207f
lea ebx, [edi + 0x504]
mov dword [esp + 0x5c], 4
lea ecx, [esp + 0x10]
push 0
push ecx
push 4
push ebx
push ebp
call esi
mov eax, dword [esp + 0x5c]
add ebx, 4
dec eax
mov dword [esp + 0x5c], eax
jne 0x6420ae
lea ebx, [edi + 0x514]
mov dword [esp + 0x5c], 4
lea edx, [esp + 0x10]
push 0
push edx
push 0x100
push ebx
push ebp
call esi
mov eax, dword [esp + 0x5c]
add ebx, 0x100
dec eax
mov dword [esp + 0x5c], eax
jne 0x6420d7
lea ebx, [edi + 0x914]
mov dword [esp + 0x5c], 4
lea eax, [esp + 0x10]
push 0
push eax
push 4
push ebx
push ebp
call esi
mov eax, dword [esp + 0x5c]
add ebx, 4
dec eax
mov dword [esp + 0x5c], eax
jne 0x642106
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [edi + 0x924]
push 0x100
push edx
push ebp
call esi
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 0x100]
mov edx, dword [0x81885c]
add eax, 4
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edi
mov eax, dword [eax + 4]
mov byte [esp + 0x5c], 1
mov ebx, eax
mov edi, dword [eax + 4]
cmp edi, edx
je 0x642184
mov edx, dword [edi + 0xc]
mov ebx, edi
cmp ecx, edx
setl dl
test dl, dl
mov byte [esp + 0x5c], dl
je 0x642179
mov edi, dword [edi]
jmp 0x64217c
mov edi, dword [edi + 8]
cmp edi, dword [0x81885c]
jne 0x642163
mov ecx, dword [esp + 0x14]
add ecx, 4
mov dl, byte [ecx + 8]
test dl, dl
je 0x64219f
lea edx, [esp + 0x3c]
lea eax, [esp + 0x30]
push edx
push ebx
push edi
jmp 0x6421ba
mov dl, byte [esp + 0x5c]
mov dword [esp + 0x1c], ebx
test dl, dl
je 0x6421d6
cmp ebx, dword [eax]
jne 0x6421cd
lea edx, [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push ebx
push edi
push eax
call fcn.006433b0
mov ecx, dword [eax]
mov byte [esp + 0x48], 1
mov dword [esp + 0x44], ecx
jmp 0x642221
lea ecx, [esp + 0x1c]
call fcn.00643750
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
mov eax, dword [edx + 0xc]
cmp eax, ecx
jge 0x642209
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push ebx
lea eax, [esp + 0x44]
push edi
push eax
add ecx, 4
mov byte [esp + 0x70], 1
call fcn.006433b0
jmp 0x642217
lea edx, [esp + 0x5c]
mov byte [esp + 0x5c], 0
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x4c]
call fcn.0043d520
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x641fb4
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x28]
push 4
push edx
push ebp
call esi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x5c], 0
test eax, eax
jle 0x6422ea
push 0x18
call fcn.00673b05
add esp, 4
mov dword [esp + 0x38], eax
test eax, eax
mov dword [esp + 0x54], 2
je 0x642280
mov ecx, eax
call fcn.006438d0
mov ebx, eax
jmp 0x642282
xor ebx, ebx
test ebx, ebx
mov dword [esp + 0x54], 0xffffffff
je 0x6422d5
push ebp
mov ecx, ebx
call fcn.00643910
mov eax, dword [esp + 0x14]
push 0xc
mov esi, dword [eax + 0x18]
mov edi, dword [esi + 4]
call fcn.00673b05
add esp, 4
mov ecx, esi
test esi, esi
jne 0x6422b2
mov ecx, eax
test edi, edi
mov dword [eax], ecx
jne 0x6422ba
mov edi, eax
mov dword [eax + 4], edi
mov dword [esi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
add eax, 8
test eax, eax
je 0x6422ce
mov dword [eax], ebx
mov eax, dword [esp + 0x14]
inc dword [eax + 0x1c]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x5c], eax
jl 0x64225b
push ebp
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, dword [esp + 0x4c]
pop esi
pop ebx
pop edi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x48
ret 4