Function at 0x10031c30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, esp
mov dword [esi + 0x18], ecx
mov eax, dword [0x10072168]
xor eax, ebp
mov dword [esi + 0x88], eax
mov dword [esi + 0x1c], edx
mov ecx, edx
push str.file:
push 5
push 0
call dword [sym.imp.libc.dll__compare___basic_string_DU__char_traits_D___1_std__V__allocator_D_23____1_std__QBEHIIPBD_Z]
xor ecx, ecx
test eax, eax
sete cl
lea eax, [ecx + ecx*4]
mov dword [esi + 0x2c], eax
mov ebx, 0x1004f65c
lea edi, [esi + 0x30]
mov eax, dword [ebx]
mov dword [esi + 0x30], 0xffffffff
push 0x1004f600
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
test eax, eax
jne 0x10031d0e
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x10031d0e
xor eax, eax
dec eax
mov dword [esi + 0x84], eax
mov dword [esi + 0x80], eax
pcmpeqd xmm0, xmm0
movdqa xmmword [esi + 0x70], xmm0
mov dword [esi + 8], ecx
push ecx
push 0x18
push 1
lea eax, [esi + 0x70]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 0x18
jne 0x10031ce8
mov eax, dword [esi + 0x70]
mov ecx, 0x61647a74
xor eax, ecx
movzx ecx, word [esi + 0x74]
xor ecx, 0x6174
or ecx, eax
je 0x10031d22
mov ecx, 3
mov edx, dword [esi + 8]
push edx
mov edi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, edi
lea edi, [esi + 0x30]
add esp, 4
test ecx, ecx
je 0x10031d0e
cmp ecx, 3
jne 0x10031f63
add ebx, 4
cmp ebx, str.tzdata
jne 0x10031c7a
jmp 0x10031f68
mov dword [esi + 0xc], ebx
xor edx, edx
mov cl, byte [esi + 0x7b]
xor eax, eax
mov edi, eax
shl edi, 8
movzx eax, byte [esi + edx + 0x7c]
or eax, edi
inc edx
cmp edx, 4
jne 0x10031d2c
xor edx, edx
xor ebx, ebx
mov edi, ebx
shl edi, 8
movzx ebx, byte [esi + edx + 0x80]
or ebx, edi
inc edx
cmp edx, 4
jne 0x10031d42
test cl, cl
mov edi, 0x1004d007
lea ecx, [esi + 0x76]
cmove edi, ecx
mov ecx, 3
test eax, eax
js 0x10031eb0
mov dword [esi + 0x28], edi
mov edx, ebx
sub edx, eax
mov dword [esi + 0x10], edx
lea edi, [esi + 0x30]
mov edx, dword [esi + 8]
jl 0x10031e85
push 0
push eax
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10031da8
mov ebx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov ecx, 3
jmp 0x10031eb9
pcmpeqd xmm0, xmm0
movdqa xmmword [esi + 0x50], xmm0
movdqa xmmword [esi + 0x40], xmm0
movdqa xmmword [esi + 0x30], xmm0
mov dword [esi + 0x60], 0xffffffff
mov eax, dword [esi + 0x10]
mov ecx, 0x4ec4ec4f
mul ecx
shr edx, 4
imul eax, edx, 0x34
mov dword [esi + 0x14], eax
mov ecx, 3
mov eax, dword [esi + 0x10]
cmp dword [esi + 0x14], eax
jne 0x10031de9
xor ecx, ecx
cmp eax, 0x34
jae 0x10031df1
mov ebx, dword [esi + 0xc]
jmp 0x10031eb6
mov dword [esi + 0x14], edx
xor eax, eax
mov edx, dword [esi + 8]
mov dword [esi + 0x10], eax
push edx
push 0x34
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 0x34
jne 0x10031e8a
xor eax, eax
xor edi, edi
mov ecx, edi
shl ecx, 8
movzx edi, byte [esi + eax + 0x58]
or edi, ecx
inc eax
cmp eax, 4
jne 0x10031e14
xor eax, eax
xor edx, edx
mov ecx, edx
shl ecx, 8
movzx edx, byte [esi + eax + 0x5c]
or edx, ecx
inc eax
cmp eax, 4
jne 0x10031e2a
add edi, ebx
js 0x10031eae
mov dword [esi + 0x24], edx
test edx, edx
mov edx, dword [esi + 8]
js 0x10031ec6
mov byte [esi + 0x58], 0
mov eax, dword [esi + 0x1c]
cmp byte [eax + 0xb], 0
jns 0x10031e5c
mov eax, dword [esi + 0x1c]
mov eax, dword [eax]
add eax, dword [esi + 0x2c]
lea ecx, [esi + 0x30]
push ecx
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x10031e94
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 0x14]
lea edi, [esi + 0x30]
mov edx, dword [esi + 8]
jne 0x10031df9
xor ecx, ecx
mov ebx, dword [esi + 0xc]
jmp 0x10031eb9
mov ebx, dword [esi + 0xc]
mov edx, dword [esi + 8]
xor ecx, ecx
jmp 0x10031eb9
push 0
push edi
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test eax, eax
mov ebx, dword [esi + 0xc]
je 0x10031ed0
xor ecx, ecx
jmp 0x10031eb3
xor ecx, ecx
mov ebx, dword [esi + 0xc]
lea edi, [esi + 0x30]
mov edx, dword [esi + 8]
test edx, edx
jne 0x10031cf0
jmp 0x10031d01
xor ecx, ecx
mov ebx, dword [esi + 0xc]
jmp 0x10031f5b
push 0x1c
call fcn.100454ea
add esp, 4
mov dword [esi + 0x20], eax
mov dword [esi + 0x14], esp
sub esp, 0x18
mov ebx, esp
lea eax, [ebx + 0xc]
mov dword [esi + 0x10], eax
mov edi, dword [esi + 0x28]
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ecx, dword [esi + 0x10]
push eax
push edi
call dword [sym.imp.libc.dll____init___basic_string_DU__char_traits_D___1_std__V__allocator_D_23____1_std__AAEXPBDI_Z]
mov edi, dword [esi + 0x20]
mov eax, dword [esi + 8]
mov dword [edi + 4], eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 0x24]
mov dword [ebx + 8], ecx
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
mov dword [edi], 0x1004f66c
mov eax, dword [ebx + 0x14]
mov dword [edi + 0x18], eax
movq xmm0, qword [ebx + 0xc]
xor eax, eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x14], eax
mov dword [ebx], eax
mov ebx, dword [esi + 0xc]
movq qword [edi + 0x10], xmm0
mov ecx, dword [esi + 0x10]
call dword [sym.imp.libc.dll___1__basic_string_DU__char_traits_D___1_std__V__allocator_D_23____1_std__QAE_XZ]
xor edx, edx
mov esp, dword [esi + 0x14]
mov eax, dword [esi + 0x18]
mov dword [eax], edi
xor ecx, ecx
inc ecx
lea edi, [esi + 0x30]
jmp 0x10031eb9
cmp ecx, 2
jne 0x10031f71
mov eax, dword [esi + 0x18]
mov dword [eax], 0
mov ecx, dword [esi + 0x88]
xor ecx, ebp
call fcn.10045530
mov eax, dword [esi + 0x18]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret