Function at 0x40d520
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [esp + 0x60]
test esi, esi
jne 0x40d88b
xor edx, edx
mov eax, str._fdump_final_insns:_
call sym.do_spec_2_char_const__char_const_
xor ecx, ecx
xor edx, edx
mov eax, 0x4f526f
call sym.do_spec_1_char_const__int__char_const_
mov eax, dword [0x56a138]
test eax, eax
je 0x40d598
mov eax, dword [eax + 4]
test eax, eax
je 0x40d598
mov edx, dword [esp + 0x64]
mov edx, dword [edx + eax*4 - 4]
cmp byte [edx], 0x2e
je 0x40d870
mov ecx, dword [0x56a05c]
xor eax, eax
test ecx, ecx
je 0x40d705
mov dword [esp], edx
xor ebx, ebx
call sym._xstrdup
mov dword [esp + 0x28], eax
jmp 0x40d6d5
mov eax, dword [0x56a05c]
test eax, eax
je 0x40d860
xor edx, edx
mov eax, str.__save_temps:_g.gkd_save_temps:_B.gkd
call sym.do_spec_2_char_const__char_const_
xor ecx, ecx
xor edx, edx
mov eax, 0x4f526f
call sym.do_spec_1_char_const__int__char_const_
mov eax, dword [0x56a138]
test eax, eax
je sym.compare_debug_dump_opt_spec_function_int__char_const___clone_.cold_
mov edx, dword [eax + 4]
test edx, edx
je sym.compare_debug_dump_opt_spec_function_int__char_const___clone_.cold_
mov eax, dword [eax + edx*4 + 4]
mov dword [esp], eax
call sym._xstrdup
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sym._xstrdup
mov edi, eax
movzx eax, byte [eax]
test al, al
je 0x40d6b3
xor ebx, ebx
xor ecx, ecx
mov ebp, 0x10800003
jmp 0x40d626
cmp al, 8
jg 0x40d710
movzx eax, byte [edi + ebx + 1]
lea edx, [ebx + 1]
test al, al
je 0x40d640
mov ebx, edx
cmp al, 0x25
jle 0x40d610
and eax, 0xffffffdf
cmp al, 0x5c
jne 0x40d618
movzx eax, byte [edi + ebx + 1]
add ecx, 1
lea edx, [ebx + 1]
test al, al
jne 0x40d624
test ecx, ecx
je 0x40d6b3
lea eax, [edx + ecx + 1]
mov dword [esp], eax
call sym._xmalloc
mov dword [esp + 0x2c], edi
mov edx, edi
mov ebp, eax
lea eax, [edi + ebx + 2]
mov ebx, 0x10800003
mov edi, eax
jmp 0x40d67e
cmp al, 8
jg 0x40d728
add edx, 1
mov byte [ebp + esi], al
add esi, 1
cmp edi, edx
je 0x40d6a5
movzx eax, byte [edx]
cmp al, 0x25
jle 0x40d668
mov ecx, eax
and ecx, 0xffffffdf
cmp cl, 0x5c
jne 0x40d670
mov byte [ebp + esi], 0x5c
add edx, 1
add esi, 1
mov byte [ebp + esi], al
add esi, 1
cmp edi, edx
jne 0x40d67e
mov edi, dword [esp + 0x2c]
mov dword [esp], edi
mov edi, ebp
call sym._free
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0x4f6a95
call sym._concat
mov dword [esp], edi
mov ebx, eax
call sym._free
mov esi, dword [0x56a05c]
mov edi, dword [esp + 0x28]
mov eax, esi
shr eax, 0x1f
mov dword [eax*4 + 0x56a0d4], edi
test esi, esi
jns 0x40d740
cmp byte [0x56a068], 0
jne 0x40d815
mov byte [0x56a068], 0
mov eax, ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
sub eax, 9
bt ebp, eax
jae 0x40d618
jmp 0x40d631
lea ecx, [eax - 9]
bt ebx, ecx
jae 0x40d670
jmp 0x40d68f
mov dword [esp + 4], 0
mov dword [esp], str._dev_urandom
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
call sym._open
mov edi, eax
test eax, eax
js 0x40d798
lea eax, [esp + 0x30]
mov dword [esp], edi
mov dword [esp + 8], 8
mov dword [esp + 4], eax
call sym._read
mov dword [esp], edi
call sym._close
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov edi, edx
or edi, eax
jne 0x40d7ea
lea eax, [esp + 0x38]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._gettimeofday
mov ecx, dword [esp + 0x3c]
mov edx, 0x10624dd3
imul edi, dword [esp + 0x38], 0x3e8
mov eax, ecx
sar ecx, 0x1f
imul edx
sar edx, 6
sub edx, ecx
add edi, edx
mov dword [esp + 0x30], edi
sar edi, 0x1f
mov dword [esp + 0x34], edi
call sym._getpid
mov edx, dword [esp + 0x34]
mov ecx, eax
xor eax, dword [esp + 0x30]
sar ecx, 0x1f
xor edx, ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x4f6ab6
mov dword [esp], 0x56a068
call sym.sprintf_char__char_const__..._
cmp byte [0x56a068], 0
mov eax, ebx
je 0x40d705
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4f6abc
mov dword [esp + 4], 0x56a068
mov dword [esp], str.__frandom_seed:_frandom_seed
call sym._concat
mov dword [esp], ebx
mov dword [esp + 0x28], eax
mov edi, eax
call sym._free
test esi, esi
mov eax, dword [esp + 0x28]
jns 0x40d705
mov ebx, edi
jmp 0x40d6fc
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [edx + 1], 0
jne 0x40d56e
xor edx, edx
mov eax, str._B.gkd
call sym.do_spec_2_char_const__char_const_
jmp 0x40d5b1
mov eax, dword [0x56cefc]
mov dword [esp + 4], str.too_many_arguments_to___:compare_debug_dump_opt
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._