Function at 0x597b1c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1078
call fcn.005a812c
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x106c], eax
mov dword [ebp - 0x1038], edx
mov dword [ebp - 0x1060], ecx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1050], eax
mov dword [ebp - 0x104c], edx
mov eax, dword [ebp + 0x14]
xor esi, esi
mov dword [eax], esi
mov dword [eax + 4], esi
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x598104
mov eax, dword [eax + 0x24]
test eax, eax
je 0x59805a
mov eax, dword [eax + 4]
mov dword [ebp - 0x1070], eax
xor ebx, ebx
mov dword [ebp - 0x105c], ebx
mov dword [ebp - 0x103c], ebx
mov dword [ebp - 0x1040], ebx
mov dword [ebp - 0x1054], ebx
mov dword [ebp - 0x1058], ebx
mov edi, dword [ebp - 0x1070]
cmp dword [ebp - 0x105c], edi
je 0x598074
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov eax, dword [eax + 0x24]
mov edx, dword [ebp - 0x105c]
call fcn.00425c8e
mov ebx, eax
xor ecx, ecx
mov dword [ebp - 0x1020], ecx
lea edx, [ebp - 0x1020]
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x34]
mov eax, dword [eax + 0x20]
call fcn.00425f4e
mov esi, eax
test eax, eax
je 0x597bfd
mov eax, dword [ebx]
cmp word [esi + 0x20], ax
jne 0x597bd8
cmp dword [ebx + 0xc], 0
jne 0x597c4d
cmp dword [ebx + 8], 0
jne 0x597c4d
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x597c4d
cmp dword [eax + 4], 1
jne 0x597c4d
xor edx, edx
call fcn.00425c8e
cmp dword [eax + 0xc], 0
jne 0x597c4d
cmp dword [eax + 8], 0
jne 0x597c4d
cmp dword [eax + 0x1c], 0
jne 0x597c4d
cmp dword [eax + 0x18], 0
jne 0x597c4d
cmp dword [eax + 0x14], 0
jne 0x597c4d
cmp dword [eax + 0x10], 0
jne 0x597c4d
xor edx, edx
mov dword [eax], edx
mov dword [eax + 4], edx
jmp 0x59804f
cmp word [ebx + 4], 0
jne 0x598006
cmp word [ebx + 2], 2
je 0x597c71
mov eax, dword [ebp - 0x1050]
mov edx, dword [ebp - 0x104c]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
test esi, esi
je 0x597e50
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x597e50
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x597ce6
mov edx, 0x609a8f
mov eax, ecx
call fcn.00427968
mov dword [ebp - 0x1034], eax
test eax, eax
je 0x59804f
mov dword [esp], 2
xor edx, edx
xor ecx, ecx
call fcn.00425b5e
mov eax, dword [ebp - 0x1034]
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov dword [ebp - 0x1030], eax
mov dword [ebp - 0x102c], edx
xor eax, eax
mov dword [esp], eax
xor edx, edx
xor ecx, ecx
mov eax, dword [ebp - 0x1034]
call fcn.00425b5e
jmp 0x597cfa
mov dword [ebp - 0x1030], eax
xor eax, eax
mov dword [ebp - 0x102c], eax
mov dword [ebp - 0x1034], eax
mov edi, dword [ebp - 0x1030]
cmp dword [ebp - 0x103c], edi
mov eax, dword [ebp - 0x1040]
sbb eax, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x103c]
cmovb eax, edi
mov dword [ebp - 0x103c], eax
mov eax, dword [ebp - 0x1040]
cmovb eax, dword [ebp - 0x102c]
mov dword [ebp - 0x1040], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x597d41
cmp dword [eax + 4], 0
jne 0x597d66
mov dword [esp], 0x20
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edx, eax
test eax, eax
je 0x597d5e
mov ecx, 8
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x18]
call fcn.00425c52
mov eax, dword [ebx + 0x18]
xor edx, edx
call fcn.00425c8e
xor edi, edi
mov dword [eax], edi
mov dword [eax + 4], edi
mov ecx, dword [ebp - 0x1030]
mov ebx, dword [ebp - 0x102c]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ebx
cmp dword [ebp + 8], 0
jne 0x597e33
mov dword [ebp - 0x1048], ecx
mov dword [ebp - 0x1044], ebx
cmp dword [ebp - 0x1034], 0
je 0x597e1d
cmp dword [ebp - 0x1044], 0
je 0x597e12
mov eax, dword [ebp - 0x1034]
mov dword [esp + 0xc], eax
mov eax, 0x1000
mov edi, dword [ebp - 0x1048]
xor edx, edx
cmp eax, edi
sbb edx, dword [ebp - 0x1044]
cmovae eax, edi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea edi, [ebp - 0x1018]
mov dword [esp], edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov ebx, eax
cmp eax, 0xffffffff
je 0x597e40
mov ecx, eax
mov edx, edi
mov eax, dword [ebp - 0x1060]
call fcn.00427720
sub dword [ebp - 0x1048], ebx
sbb dword [ebp - 0x1044], 0
jmp 0x597da8
cmp dword [ebp - 0x1048], 0
jne 0x597db1
jmp 0x597e40
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x34]
mov eax, dword [ebp - 0x1060]
call fcn.00427720
jmp 0x597fd8
cmp dword [ebp - 0x1034], 0
je 0x597fd8
mov eax, dword [ebp - 0x1034]
call fcn.00425b84
jmp 0x597fd8
mov eax, dword [ebx + 0x18]
xor esi, esi
mov dword [ebp - 0x1030], esi
mov dword [ebp - 0x102c], esi
test eax, eax
je 0x597fd8
cmp dword [eax + 4], 0
je 0x597fd8
xor ecx, ecx
mov dword [ebp - 0x101c], ecx
lea edx, [ebp - 0x101c]
mov eax, dword [ebx + 0x18]
call fcn.00425f4e
mov ecx, eax
test eax, eax
je 0x597fd8
cmp dword [ecx + 0x14], 0
jne 0x597e7b
cmp dword [ecx + 0x10], 0
jne 0x597e7b
cmp dword [ebp - 0x101c], 0
je 0x597ee2
mov edi, dword [ebp - 0x1030]
cmp dword [ebp - 0x1054], edi
mov eax, dword [ebp - 0x1058]
sbb eax, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x1054]
cmovb eax, edi
mov dword [ebp - 0x1054], eax
mov eax, dword [ebp - 0x1058]
cmovb eax, dword [ebp - 0x102c]
mov dword [ebp - 0x1058], eax
mov eax, dword [ebp - 0x1050]
mov edx, dword [ebp - 0x104c]
add eax, dword [ebp - 0x1030]
adc edx, dword [ebp - 0x102c]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov esi, dword [ecx + 8]
mov edi, dword [ecx + 0xc]
add dword [ebp - 0x1030], esi
adc dword [ebp - 0x102c], edi
cmp dword [ebp - 0x103c], esi
mov eax, dword [ebp - 0x1040]
sbb eax, edi
mov eax, dword [ebp - 0x103c]
cmovb eax, esi
mov dword [ebp - 0x103c], eax
mov eax, dword [ebp - 0x1040]
cmovb eax, edi
mov dword [ebp - 0x1040], eax
cmp dword [ebp + 8], 0
jne 0x597e7b
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
add eax, dword [ecx + 0x18]
adc edx, dword [ecx + 0x1c]
mov ecx, edx
mov edx, eax
mov eax, dword [ebp - 0x106c]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x14]
call fcn.004272a7
test edi, edi
je 0x597fcf
mov edx, 0x1000
xor eax, eax
cmp edx, esi
mov ecx, eax
sbb ecx, edi
cmovae edx, esi
mov dword [ebp - 0x1068], edx
cmovae eax, edi
mov dword [ebp - 0x1064], eax
mov ecx, edx
lea edx, [ebp - 0x1018]
mov eax, dword [ebp - 0x106c]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x1034], ecx
call fcn.0042755d
mov ecx, dword [ebp - 0x1034]
lea edx, [ebp - 0x1018]
mov eax, dword [ebp - 0x1060]
call fcn.00427720
sub esi, dword [ebp - 0x1068]
sbb edi, dword [ebp - 0x1064]
jmp 0x597f68
test esi, esi
jne 0x597f6c
jmp 0x597e7b
mov esi, dword [ebp - 0x1030]
mov edi, dword [ebp - 0x102c]
add dword [ebp - 0x1050], esi
adc dword [ebp - 0x104c], edi
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp - 0x1030]
mov edx, dword [ebp - 0x102c]
add dword [edi], eax
adc dword [edi + 4], edx
jmp 0x59804f
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x598013
cmp dword [eax + 4], 0
jne 0x598038
mov dword [esp], 0x20
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edx, eax
test eax, eax
je 0x598030
mov ecx, 8
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x18]
call fcn.00425c52
mov eax, dword [ebx + 0x18]
xor edx, edx
call fcn.00425c8e
xor edx, edx
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
inc dword [ebp - 0x105c]
jmp 0x597ba5
xor eax, eax
mov dword [ebp - 0x1054], eax
mov dword [ebp - 0x1058], eax
mov dword [ebp - 0x103c], eax
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x104c], 0
jbe 0x59808c
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x22], 8
jmp 0x5980a4
jne 0x598097
cmp dword [ebp - 0x1050], 0
je 0x5980a4
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x22], 4
cmp dword [ebp - 0x1040], 0
jbe 0x5980bc
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x21], 8
jmp 0x5980d4
jne 0x5980c7
cmp dword [ebp - 0x103c], 0
je 0x5980d4
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x21], 4
cmp dword [ebp - 0x1058], 0
jbe 0x5980ec
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x20], 8
jmp 0x598104
jne 0x5980f7
cmp dword [ebp - 0x1054], 0
je 0x598104
mov eax, dword [ebp - 0x1038]
mov eax, dword [eax + 0x2c]
mov byte [eax + 0x20], 4
add esp, 0x107c
pop ebx
pop esi
pop edi
pop ebp
ret