Function at 0x413770
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x20
cmp dword [eax + 0x18], 0x10
push ebx
push esi
push edi
jb 0x413787
mov eax, dword [eax + 4]
jmp 0x41378a
add eax, 4
push 0x4611e8
push eax
call fcn.00427d18
mov esi, eax
add esp, 8
mov dword [ebp - 0xc], esi
test esi, esi
je 0x4137cf
push esi
push 8
lea eax, [ebp - 0x20]
push 1
push eax
call fcn.004294bd
lea ecx, [ebp - 0x20]
push ecx
mov eax, 8
xor edx, edx
call fcn.0041a170
add esp, 0x14
test eax, eax
je 0x4137d8
push esi
call fcn.00427e39
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00418200
mov edi, eax
mov dword [ebp - 4], edi
test edi, edi
je 0x4137c6
call fcn.0041a330
mov dword [ebp - 8], eax
test eax, eax
jne 0x41380f
lea edx, [ebp - 4]
push edx
xor edi, edi
call fcn.00418ce0
push esi
call fcn.00427e39
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push edi
mov dword [edi + 0x40], fcn.0042959c
call fcn.00458cdc
add esp, 8
test eax, eax
je 0x413846
lea eax, [ebp - 4]
push eax
lea edi, [ebp - 8]
call fcn.00418ce0
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00427e39
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
push 0x413730
mov eax, edi
call fcn.0041a960
add esp, 4
test edi, edi
je 0x413866
mov byte [edi + 0x124], 8
mov esi, dword [ebp - 8]
push esi
call fcn.00418440
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
push edx
push ebx
push eax
lea edx, [ebp - 0x18]
mov eax, esi
mov ecx, edi
call fcn.00418190
mov edx, dword [ebp - 0x14]
add esp, 0x10
cmp edx, 8
jge 0x41389b
mov eax, edi
call fcn.00419d10
jmp 0x4138ab
cmp edx, 0x10
jne 0x4138ab
test edi, edi
je 0x4138ab
or dword [edi + 0x68], 0x400
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x4138cc
cmp edx, 8
jge 0x4138cc
test edi, edi
je 0x4138cc
or dword [edi + 0x68], 0x2001000
mov edx, 0xffffffbf
and dword [edi + 0x64], edx
jmp 0x4138d1
mov edx, 0xffffffbf
cmp ecx, 3
jne 0x4138e4
test edi, edi
je 0x4138e4
or dword [edi + 0x68], 0x2001000
and dword [edi + 0x64], edx
test ecx, ecx
je 0x4138ed
cmp ecx, 4
jne 0x4138f7
or dword [edi + 0x68], 0x4000
and dword [edi + 0x64], edx
test edi, edi
je 0x413911
test esi, esi
je 0x413911
mov eax, dword [esi + 8]
and eax, 0x10
je 0x413911
or dword [edi + 0x68], 0x2001000
and dword [edi + 0x64], edx
test cl, 4
jne 0x41391d
mov eax, edi
call fcn.00419d30
test edi, edi
je 0x413925
or dword [edi + 0x68], 1
push esi
mov eax, edi
call fcn.004186b0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
imul eax, dword [ebx]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00426b12
mov dword [ebp - 0x10], eax
mov eax, dword [ebx]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00426b12
xor ecx, ecx
add esp, 0xc
mov esi, eax
cmp byte [ebp + 0x14], cl
je 0x41398f
xor eax, eax
cmp dword [ebx], ecx
jbe 0x4139b7
mov edx, dword [ebp - 0x10]
add edx, ecx
mov dword [esi + eax*4], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
inc eax
lea ecx, [ecx + edx*4]
cmp eax, dword [ebx]
jb 0x413978
jmp 0x4139b7
mov eax, dword [ebx]
mov edx, dword [ebp + 0xc]
dec eax
imul eax, dword [edx]
add eax, eax
add eax, eax
cmp dword [ebx], ecx
jbe 0x4139b7
mov edx, dword [ebp - 0x10]
add edx, eax
mov dword [esi + ecx*4], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
inc ecx
neg edx
lea eax, [eax + edx*4]
cmp ecx, dword [ebx]
jb 0x4139a0
push esi
call fcn.00418af0
mov eax, edi
call fcn.00418b60
lea eax, [ebp - 4]
push eax
lea edi, [ebp - 8]
call fcn.00418ce0
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00427e39
push esi
call fcn.00427d2f
mov eax, dword [ebp - 0x10]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret