Function at 0x4316d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x73dd74]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov ecx, 0x743104
mov dword [ebp - 0x420], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x41c], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x428], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x424], eax
call fcn.00442547
lea eax, [ebp - 0x404]
xor ebx, ebx
push eax
push esi
mov edi, str._RADIANCE
call fcn.004315a0
add esp, 8
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x431754
test cl, cl
je 0x431750
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x431754
add eax, 2
add edi, 2
test cl, cl
jne 0x431734
xor eax, eax
jmp 0x431759
sbb eax, eax
or eax, 1
test eax, eax
je 0x43177a
pop edi
pop esi
mov dword [0x73e710], 0x71c3b0
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00442579
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x404]
push eax
push esi
call fcn.004315a0
add esp, 8
mov dword [ebp - 0x410], eax
cmp byte [eax], bl
je 0x431d62
mov edi, 1
nop dword [eax]
mov ecx, str.FORMAT32_bit_rle_rgbe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4317c5
test dl, dl
je 0x4317c1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4317c5
add eax, 2
add ecx, 2
test dl, dl
jne 0x4317a5
xor eax, eax
jmp 0x4317ca
sbb eax, eax
or eax, 1
test eax, eax
lea eax, [ebp - 0x404]
push eax
push esi
cmove ebx, edi
call fcn.004315a0
add esp, 8
mov dword [ebp - 0x410], eax
cmp byte [eax], 0
jne 0x4317a0
test ebx, ebx
je 0x431d62
lea eax, [ebp - 0x404]
push eax
push esi
call fcn.004315a0
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
push 3
push 0x71c3f4
push eax
mov dword [ebp - 0x410], eax
call edi
add esp, 0x14
test eax, eax
jne 0x431d62
mov eax, dword [ebp - 0x410]
lea ecx, [ebp - 0x410]
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add eax, 3
push 0xa
push ecx
push eax
mov dword [ebp - 0x410], eax
call ebx
mov ecx, dword [ebp - 0x410]
add esp, 0xc
mov dword [ebp - 0x42c], eax
cmp byte [ecx], 0x20
jne 0x431861
inc ecx
mov dword [ebp - 0x410], ecx
cmp byte [ecx], 0x20
je 0x431855
push 3
push 0x71c3f8
push ecx
call edi
add esp, 0xc
test eax, eax
jne 0x431d62
mov eax, dword [ebp - 0x410]
push 0xa
add eax, 3
push 0
push eax
mov dword [ebp - 0x410], eax
call ebx
mov ecx, dword [ebp - 0x41c]
mov edx, eax
mov ebx, dword [ebp - 0x42c]
mov eax, dword [ebp - 0x420]
test eax, eax
mov dword [ebp - 0x414], edx
mov dword [ecx], edx
mov ecx, dword [ebp - 0x428]
mov dword [ecx], ebx
mov ecx, dword [ebp - 0x424]
mov dword [ecx], 3
mov ecx, 3
cmovne ecx, eax
mov edi, ecx
mov dword [ebp - 0x420], ecx
imul edi, edx
mov eax, edi
imul eax, ebx
shl eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, dword [ebp - 0x414]
add esp, 0x10
mov ebx, eax
mov dword [ebp - 0x424], ebx
lea ecx, [edx - 8]
cmp ecx, 0x7ff7
ja 0x431ce5
xor eax, eax
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x42c], eax
jle 0x431c19
lea eax, [edi*4]
mov dword [ebp - 0x428], ebx
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov dword [ebp - 0x434], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x431992
push eax
call edi
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x408], ecx
test eax, eax
je 0x4319a7
push eax
call edi
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x418], ecx
test eax, eax
je 0x4319c2
push eax
call edi
mov ecx, dword [ebp - 0x418]
mov ebx, eax
mov edx, dword [ebp - 0x408]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x4319e1
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x4319a3
movzx edx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x4319ad
xor edx, edx
jmp 0x4319ad
mov edx, dword [ebp - 0x408]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x4319be
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x4319ce
xor ecx, ecx
jmp 0x4319ce
mov ecx, dword [ebp - 0x418]
mov edx, dword [ebp - 0x408]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x4319df
movzx ebx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x4319e1
xor ebx, ebx
cmp edx, 2
jne 0x431c70
cmp ecx, edx
jne 0x431c70
test bl, bl
js 0x431c70
mov eax, dword [esi + 0x10]
shl ebx, 8
test eax, eax
je 0x431a16
push eax
call edi
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x431a29
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x431a27
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x431a29
xor ecx, ecx
mov edx, dword [ebp - 0x414]
or ecx, ebx
cmp ecx, edx
jne 0x431c3a
mov ebx, dword [ebp - 0x40c]
test ebx, ebx
jne 0x431a62
lea eax, [edx*4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, dword [ebp - 0x414]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x40c], ebx
xor ecx, ecx
mov dword [ebp - 0x418], ecx
nop word [eax + eax]
xor edi, edi
mov dword [ebp - 0x408], edi
test edx, edx
jle 0x431b98
mov eax, dword [esi + 0x10]
test eax, eax
je 0x431aa9
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov ecx, dword [ebp - 0x418]
mov ebx, eax
mov edx, dword [ebp - 0x414]
xor eax, eax
add esp, 4
cmp ebx, 0xffffffff
cmove ebx, eax
jmp 0x431abc
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x431aba
movzx ebx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x431abc
xor ebx, ebx
cmp bl, 0x80
jbe 0x431b24
mov eax, dword [esi + 0x10]
test eax, eax
je 0x431ade
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov edx, eax
add esp, 4
xor eax, eax
cmp edx, 0xffffffff
cmove edx, eax
jmp 0x431af1
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x431aef
movzx edx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x431af1
xor edx, edx
add bl, 0x80
movzx ecx, bl
mov ebx, dword [ebp - 0x40c]
je 0x431b1c
mov eax, dword [ebp - 0x418]
lea eax, [eax + edi*4]
add eax, ebx
add edi, ecx
mov dword [ebp - 0x408], edi
mov byte [eax], dl
lea eax, [eax + 4]
sub ecx, 1
jne 0x431b12
mov edx, dword [ebp - 0x414]
jmp 0x431b8a
movzx ebx, bl
test ebx, ebx
je 0x431b84
lea edi, [ecx + edi*4]
add edi, dword [ebp - 0x40c]
add dword [ebp - 0x408], ebx
nop word [eax + eax]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x431b5b
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
xor ecx, ecx
add esp, 4
cmp eax, 0xffffffff
cmove eax, ecx
jmp 0x431b6e
mov ecx, dword [esi + 0x14]
cmp ecx, dword [esi + 0x18]
jae 0x431b6c
movzx eax, byte [ecx]
inc ecx
mov dword [esi + 0x14], ecx
jmp 0x431b6e
xor eax, eax
mov byte [edi], al
add edi, 4
sub ebx, 1
jne 0x431b40
mov edi, dword [ebp - 0x408]
mov edx, dword [ebp - 0x414]
mov ebx, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x418]
cmp edi, edx
jl 0x431a80
inc ecx
mov dword [ebp - 0x418], ecx
cmp ecx, 4
jl 0x431a70
test edx, edx
jle 0x431be8
mov ecx, dword [ebp - 0x420]
mov edi, ebx
mov ebx, dword [ebp - 0x428]
mov esi, edx
nop dword [eax]
push ecx
push edi
push ebx
call fcn.00431470
mov ecx, dword [ebp - 0x420]
add esp, 0xc
add edi, 4
lea eax, [ecx*4]
add ebx, eax
sub esi, 1
jne 0x431bc0
mov esi, dword [ebp - 0x430]
mov ecx, dword [ebp - 0x41c]
mov eax, dword [ebp - 0x434]
inc ecx
add dword [ebp - 0x428], eax
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov dword [ebp - 0x41c], ecx
cmp ecx, dword [ebp - 0x42c]
jl 0x431933
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp - 0x424]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00442579
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x424]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push dword [ebp - 0x40c]
call esi
add esp, 8
mov dword [0x73e710], 0x71c3fc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00442579
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10]
mov byte [ebp - 0x408], dl
mov byte [ebp - 0x407], cl
mov byte [ebp - 0x406], bl
test eax, eax
je 0x431c9b
push eax
call edi
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x431cae
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x431cac
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x431cae
xor ecx, ecx
mov byte [ebp - 0x405], cl
lea eax, [ebp - 0x408]
mov ecx, dword [ebp - 0x420]
push ecx
push eax
push dword [ebp - 0x424]
call fcn.00431470
push dword [ebp - 0x40c]
mov edi, 1
xor ebx, ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x10
jmp 0x431cf9
xor ebx, ebx
cmp ebx, dword [ebp - 0x42c]
jge 0x431c23
xor edi, edi
cmp edi, edx
jge 0x431d5f
mov eax, dword [esi + 0x10]
test eax, eax
je 0x431d17
push eax
push 4
lea eax, [ebp - 0x41c]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
jmp 0x431d28
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx]
mov dword [ebp - 0x41c], eax
lea eax, [ecx + 4]
mov dword [esi + 0x14], eax
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x41c]
push ecx
push eax
mov eax, ebx
imul eax, dword [ebp - 0x414]
add eax, edi
imul eax, ecx
mov ecx, dword [ebp - 0x424]
lea eax, [ecx + eax*4]
push eax
call fcn.00431470
mov edx, dword [ebp - 0x414]
add esp, 0xc
inc edi
jmp 0x431cf5
inc ebx
jmp 0x431ce7
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
mov dword [0x73e710], 0x71c3dc
pop ebx
call fcn.00442579
mov esp, ebp
pop ebp
ret