Function at 0x40baa0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x5061ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov byte [ebp - 0x25], 0
call fcn.0040bee0
test al, al
je 0x40bd51
mov ecx, dword [esi]
test ecx, ecx
je 0x40bd51
cmp ecx, 0xffffffff
je 0x40bd51
test edi, edi
js 0x40bd51
movzx eax, word [esi + 0x28]
cmp edi, eax
jge 0x40bd51
cmp dword [esi + 4], 0
mov eax, dword [esi + 0x38]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 0x2a]
je 0x40bb11
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], eax
cmp eax, ecx
jb 0x40bb1d
mov dword [esi + 8], ecx
jmp 0x40bb1d
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi]
xor ecx, ecx
mov dword [ebp - 0x30], ecx
test eax, eax
je 0x40bd51
cmp eax, 0xffffffff
je 0x40bd51
cmp dword [esi + 4], ecx
je 0x40bb91
mov eax, dword [esi + 4]
lea edi, [ecx + 0x1e]
test eax, eax
je 0x40bd51
lea edx, [ebp - 0x30]
xor eax, eax
test edx, edx
mov edx, dword [esi + 0xc]
cmovne ecx, eax
mov dword [ebp - 0x30], ecx
mov ecx, dword [esi + 8]
cmp ecx, edx
jae 0x40bd51
lea eax, [ecx + 0x1e]
cmp eax, edx
jbe 0x40bb6e
mov edi, edx
sub edi, ecx
mov eax, dword [esi + 4]
add eax, ecx
push edi
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004a70c0
add dword [esi + 8], edi
lea eax, [ebp - 0x30]
add esp, 0xc
test eax, eax
je 0x40bd51
jmp 0x40bba7
push 0
lea ecx, [ebp - 0x30]
push ecx
push 0x1e
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x30]
cmp edi, 0x1e
jne 0x40bd51
cmp dword [ebp - 0x24], 0x4034b50
jne 0x40bd51
movzx eax, word [ebp - 0xa]
movzx ecx, word [ebp - 8]
add ecx, eax
mov eax, dword [esi]
test eax, eax
je 0x40bbf4
cmp eax, 0xffffffff
je 0x40bbf4
cmp dword [esi + 4], 0
je 0x40bbe8
add dword [esi + 8], ecx
mov eax, dword [esi + 0xc]
cmp dword [esi + 8], eax
jb 0x40bbf4
mov dword [esi + 8], eax
jmp 0x40bbf4
push 1
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x12]
call fcn.0048e3fb
mov edi, eax
add esp, 4
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x40bd51
push dword [ebp - 0x12]
mov ecx, esi
push edi
call fcn.0040c1e0
mov ecx, dword [ebp - 0x12]
mov dword [ebp - 0x34], ecx
cmp eax, ecx
je 0x40bc2f
push edi
call fcn.0048e404
add esp, 4
jmp 0x40bd51
test byte [ebp - 0x1e], 1
mov dword [ebp - 0x38], ecx
je 0x40bc80
lea edx, [esi + 0x40]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40bc40
sub ecx, esi
je 0x40bc21
mov esi, dword [ebp - 0x16]
mov ecx, ebx
push edx
call fcn.0040be00
test al, al
je 0x40bc21
push esi
push dword [ebp - 0x34]
mov ecx, ebx
push edi
call fcn.0040b740
test al, al
je 0x40bc21
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040b660
mov edi, dword [ebp - 0x2c]
test al, al
je 0x40bc21
movzx eax, word [ebp - 0x1c]
mov byte [ebp - 0x25], 1
test eax, eax
je 0x40bd44
cmp eax, 8
jne 0x40bd3b
push dword [ebp - 0xe]
call fcn.0048e3fb
mov esi, eax
lea eax, [ebp - 0x70]
push 0x34
push 0
push eax
mov dword [ebp - 0x2c], esi
call fcn.004a7c50
mov eax, dword [ebp - 0x12]
push 0x38
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xe]
push str.1.2.8
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x74]
push 0xfffffffffffffff1
push eax
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
call fcn.0048b200
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x40bd23
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.00489a80
mov esi, eax
add esp, 8
test esi, esi
je 0x40bd06
cmp esi, 1
jne 0x40bd44
lea eax, [ebp - 0x74]
push eax
call fcn.0048b1b0
xor eax, eax
cmp esi, 1
cmove esi, eax
lea eax, [ebp - 0x74]
push eax
call fcn.0048b1b0
add esp, 8
push edi
call fcn.0048e404
add esp, 4
test esi, esi
je 0x40bd41
push dword [ebp - 0x2c]
call fcn.0048e404
add esp, 4
mov byte [ebp - 0x25], 0
jmp 0x40bd51
mov edi, dword [ebp - 0x2c]
cmp dword [ebx], 0
jne 0x40bd51
mov ecx, dword [ebp - 0xe]
mov dword [ebx], edi
mov dword [ebx + 8], ecx
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x25]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0048e386
mov esp, ebp
pop ebp
ret 8