Function at 0x40b8f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov eax, dword [0x43d00c]
mov edi, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x408], 0
je 0x40b9f2
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.0041f3f0
add esp, 4
push eax
push ebx
call fcn.0040e4c0
add esp, 8
movzx eax, al
lea esi, [edi + eax*4 + 4]
mov esi, dword [esi]
lea eax, [esi + 0x10]
push ebx
push eax
call fcn.0041f260
add esp, 8
test eax, eax
jne 0x40b930
mov edi, dword [esi + 8]
test edi, edi
je 0x40bc10
mov ebx, dword [esi + 4]
push 0xc
call fcn.0041f18c
add esp, 4
test eax, eax
je 0x40bbee
mov ecx, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], edi
mov edx, eax
mov eax, dword [ecx + 0x404]
test eax, eax
je 0x40bc0a
lea ecx, [edi + ebx - 1]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ecx
mov edi, dword [eax + 4]
mov ecx, eax
mov eax, dword [eax + 8]
cmp edi, dword [ebp - 0x24]
lea edx, [edi + eax - 1]
ja 0x40b9a9
cmp edx, dword [ebp - 0x24]
jae 0x40bbe3
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x28]
cmp edx, ebx
setae byte [ebp - 0x2c]
cmp ecx, edi
setb al
cmp ecx, edx
seta ah
cmp edi, ebx
setb bl
cmp edx, ecx
setbe cl
test byte [ebp - 0x2c], cl
mov ecx, dword [ebp - 0x20]
jne 0x40bbe3
and bl, ah
or al, bl
je 0x40bbe3
mov eax, dword [ecx]
test eax, eax
jne 0x40b98f
mov eax, dword [ebp - 0x30]
mov dword [ecx], eax
jmp 0x40bc10
xor esi, esi
push esi
push esi
push dword [edi]
call fcn.00419c7f
add esp, 0xc
lea eax, [ebp - 0x14]
push dword [edi]
push 1
push 4
push eax
call fcn.0041eb0c
add esp, 0x10
cmp eax, 1
jne 0x40bc10
cmp dword [ebp - 0x14], 0x3152414d
jne 0x40bc10
lea eax, [ebp - 0x18]
push dword [edi]
push 1
push 4
push eax
call fcn.0041eb0c
add esp, 0x10
cmp eax, 1
jne 0x40bc10
push dword [ebp - 0x18]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x18], eax
push 0
push eax
push dword [edi]
call fcn.00419c7f
add esp, 0xc
test eax, eax
jne 0x40bc10
lea eax, [ebp - 0x1c]
push dword [edi]
push 1
push 4
push eax
call fcn.0041eb0c
add esp, 0x10
cmp eax, 1
jne 0x40bc10
push dword [ebp - 0x1c]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov ebx, eax
mov dword [ebp - 0x1c], eax
push eax
call fcn.0041f18c
add esp, 4
test eax, eax
je 0x40bc10
push dword [edi]
push 1
push ebx
push eax
mov dword [ebp - 0x20], eax
call fcn.0041eb0c
add esp, 0x10
cmp eax, 1
jne 0x40bc24
mov ecx, dword [ebp - 0x20]
test ebx, ebx
lea edx, [ecx + ebx]
mov eax, ecx
mov dword [ebp - 0x2c], edx
jle 0x40bc37
lea eax, [edx - 1]
mov dword [ebp - 0x38], eax
lea eax, [ebx + ecx - 0xd]
mov dword [ebp - 0x3c], eax
mov eax, ecx
mov ebx, eax
mov edx, edx
sub edx, ebx
cmp edx, 0xe
jl 0x40bc56
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 4]
mov dword [ebp - 0x28], eax
lea eax, [ebx + 0xc]
mov dword [ebp - 0x24], eax
push dword [ebx]
mov eax, dword [sym.imp.WSOCK32.dll_ntohl]
call eax
mov dword [ebp - 0x30], eax
push edi
mov edi, dword [ebp + 8]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x40], eax
push dword [ebp - 0x28]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x28], eax
cmp byte [ebx + 0xc], 0
mov eax, dword [ebp - 0x24]
je 0x40bb42
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
sub ecx, ebx
test ecx, ecx
je 0x40bc31
dec ecx
cmp byte [edx + 1], 0
lea eax, [edx + 1]
mov edx, eax
jne 0x40bb2e
mov edx, dword [ebp - 0x2c]
cmp eax, edx
je 0x40bc34
mov ebx, eax
sub ebx, dword [ebp - 0x24]
js 0x40bc34
inc eax
mov dword [ebp - 0x34], eax
lea eax, [ebx + 0x14]
push eax
call fcn.0041f18c
add esp, 4
test eax, eax
je 0x40bc5a
mov ecx, eax
mov dword [eax], 0
mov eax, dword [ebp - 0x30]
inc ebx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], ecx
mov dword [ecx + 0xc], eax
add ecx, 0x10
push ebx
mov ebx, dword [ebp - 0x24]
push ebx
push ecx
call fcn.00424320
add esp, 0xc
push ebx
call fcn.0041f3f0
add esp, 4
push eax
push ebx
call fcn.0040e4c0
add esp, 8
movzx eax, al
mov ecx, dword [edi + eax*4 + 4]
test ecx, ecx
je 0x40bbc7
mov eax, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x40bbbd
jmp 0x40bbcb
lea eax, [edi + eax*4 + 4]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
cmp eax, edx
jb 0x40bada
jmp 0x40bc37
push dword [ebp - 0x30]
call fcn.0041ed02
add esp, 4
push 2
call fcn.0041526f
add esp, 4
push str.ERROR:_file_content_collision_in_mar_find_item___n
push eax
call fcn.004053f0
add esp, 8
xor esi, esi
jmp 0x40bc10
mov dword [ecx + 0x404], edx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412591
mov eax, esi
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
push dword [ebp - 0x20]
call fcn.0041ed02
add esp, 4
jmp 0x40bc10
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x20]
push ecx
mov ebx, eax
call fcn.0041ed02
add esp, 4
cmp ebx, dword [ebp - 0x2c]
jne 0x40bc10
mov dword [edi + 0x408], 1
jmp 0x40b913
mov eax, ebx
jmp 0x40bc37
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
jmp 0x40bc37