Function at 0x40dad2
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 0xc]
mov dword [0x460610], 0
mov dword [0x460620], 0
mov dword [0x460640], 0
cmp dword [0x455090], 0
je 0x40db10
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call fcn.0040da12
mov dword [0x464760], 0xfe
mov eax, 0
mov edx, dword [ebp + 0x10]
test byte [edx + 0x120], 0x40
jne 0x40e62e
mov esi, ebx
mov edi, 0x451608
mov ecx, 2
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x40db60
mov esi, ebx
mov edi, 0x45160a
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
jne 0x40db69
mov ecx, dword [ebp + 0x10]
mov byte [ecx + 0x28], 1
jmp 0x40db7f
mov esi, dword [ebp + 0x10]
lea edi, [esi + 0x29]
cld
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esi + 0x28], cl
mov edx, dword [ebp + 0x10]
movzx eax, byte [edx + 0x28]
add al, 0x21
mov byte [edx + 8], al
movzx eax, al
mov dword [0x460630], eax
test al, 1
je 0x40dba0
inc eax
mov dword [0x460630], eax
mov byte [edx + 8], al
cmp dword [0x460630], 0x45
jg 0x40dbb3
mov dword [0x460630], 0x46
mov ecx, dword [ebp + 0x18]
movzx eax, word [ecx + 6]
and eax, 0xf000
cmp eax, 0x8000
jne 0x40dd3f
cmp dword [0x455144], 0
je 0x40dd3f
mov esi, dword [ebp + 0x10]
cmp dword [esi + 0x140], 0
je 0x40dd3f
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x2a
cmp eax, dword [0x464760]
jle 0x40dc17
mov dword [esp + 4], 0x121
mov dword [esp], 0x45160d
call fcn.0040d824
mov edx, dword [0x460610]
mov byte [edx + 0x460650], 0x41
mov byte [edx + 0x460651], 0x41
mov byte [edx + 0x460652], 0xe
mov byte [edx + 0x460653], 2
lea ecx, [edx + 4]
mov dword [0x460610], ecx
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x48]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 5]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x49]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 6]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x4a]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 7]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x4b]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 8]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x4d]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 9]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x4e]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 0xa]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x4f]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 0xb]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, byte [eax + 0x50]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 0xc]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movsx eax, byte [eax + 0x39]
mov byte [ecx + 0x460650], al
lea ecx, [edx + 0xd]
mov dword [0x460610], ecx
mov eax, dword [esi + 0x140]
movzx eax, word [eax + 0x38]
mov byte [ecx + 0x460650], al
add edx, 0xe
mov dword [0x460610], edx
cmp dword [0x45508c], 0
je 0x40e5cb
test byte [ebp + 0x1c], 0x10
je 0x40ddb6
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x53
mov byte [eax + 0x460651], 0x50
mov byte [eax + 0x460652], 7
mov byte [eax + 0x460653], 1
mov byte [eax + 0x460654], 0xbe
mov byte [eax + 0x460655], 0xef
lea edx, [eax + 6]
mov dword [0x460610], edx
cmp dword [0x455090], 0
je 0x40dda4
mov byte [edx + 0x460650], 0xe
add eax, 7
mov dword [0x460610], eax
jmp 0x40ddb6
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0
inc eax
mov dword [0x460610], eax
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x21
cmp eax, dword [0x464760]
jle 0x40dde6
mov dword [esp + 4], 0x14b
mov dword [esp], 0x451610
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x52
mov byte [eax + 0x460651], 0x52
mov byte [eax + 0x460652], 5
mov byte [eax + 0x460653], 1
lea edx, [eax + 4]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], 0
mov byte [edx + 0x460650], 0
add eax, 5
mov dword [0x460610], eax
mov esi, ebx
mov edi, 0x451608
mov ecx, 2
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x40e02c
mov esi, ebx
mov edi, 0x45160a
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x40e02c
cmp dword [0x455150], 0
je 0x40de94
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x140], 0
je 0x40de94
cmp dword [ecx + 0x150], 0
je 0x40de94
mov edx, dword [ecx + 0x140]
mov edi, edx
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
lea esi, [ecx - 1]
mov ebx, edx
jmp 0x40dea5
mov edi, ebx
cld
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
lea esi, [ecx - 1]
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x22
cmp eax, dword [0x464760]
jle 0x40ded5
mov dword [esp + 4], 0x168
mov dword [esp], 0x451613
call fcn.0040d824
test esi, esi
je 0x40e02c
mov edi, esi
mov dword [ebp - 0x34], 0
mov ecx, dword [0x460630]
lea eax, [esi + ecx]
mov edx, dword [0x460610]
sub edx, dword [0x460620]
lea eax, [eax + edx + 0x21]
cmp eax, dword [0x464760]
jle 0x40df1a
add edx, ecx
mov eax, dword [0x464760]
sub eax, edx
lea edi, [eax - 0x21]
mov dword [ebp - 0x34], 1
cmp edi, 0xf8
jle 0x40df2a
mov edi, 0xf8
inc dword [ebp - 0x34]
test edi, edi
jns 0x40df46
mov dword [esp + 8], edi
mov dword [esp + 4], str.Negative_RR_name_length_residual:__d_n
mov dword [esp], 0xffffffff
call fcn.0042c48d
mov edx, dword [0x460610]
mov byte [edx + 0x460650], 0x4e
mov byte [edx + 0x460651], 0x4d
mov eax, edi
add al, 5
mov byte [edx + 0x460652], al
mov byte [edx + 0x460653], 1
lea ecx, [edx + 5]
mov dword [0x460610], ecx
cmp esi, edi
setne byte [edx + 0x460654]
or dword [ebp - 0x30], 8
cmp dword [0x455150], 0
je 0x40dfc9
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x140], 0
je 0x40dfc9
cmp dword [eax + 0x150], 0
je 0x40dfc9
mov eax, dword [0x4551ac]
mov dword [esp + 0x10], eax
mov eax, dword [0x4551b0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
lea eax, [ecx + 0x460650]
mov dword [esp], eax
call fcn.0040d7d0
jmp 0x40dff5
mov eax, dword [0x4551ac]
mov dword [esp + 0x10], eax
mov eax, dword [0x4551a8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [0x460610]
add eax, 0x460650
mov dword [esp], eax
call fcn.0040d7d0
add ebx, edi
add dword [0x460610], edi
sub esi, edi
setne al
cmp dword [ebp - 0x34], 0
setne dl
movzx eax, al
test edx, eax
je 0x40e024
mov dword [esp + 4], 0x191
mov dword [esp], 0x451613
call fcn.0040d824
test esi, esi
jne 0x40dedd
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x40
cmp eax, dword [0x464760]
jle 0x40e05c
mov dword [esp + 4], 0x197
mov dword [esp], 0x45163e
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x50
mov byte [eax + 0x460651], 0x58
mov byte [eax + 0x460652], 0x24
mov byte [eax + 0x460653], 1
add eax, 4
mov dword [0x460610], eax
or dword [ebp - 0x30], 1
mov ecx, dword [ebp + 0x18]
movzx edx, word [ecx + 6]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
mov eax, dword [0x460610]
add eax, 8
mov dword [0x460610], eax
mov esi, dword [ebp + 0x18]
movsx edx, word [esi + 8]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
mov eax, dword [0x460610]
add eax, 8
mov dword [0x460610], eax
movsx edx, word [esi + 0xa]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
mov eax, dword [0x460610]
add eax, 8
mov dword [0x460610], eax
movsx edx, word [esi + 0xc]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
mov ecx, dword [0x460610]
add ecx, 8
mov dword [0x460610], ecx
movzx eax, word [esi + 6]
and eax, 0xf000
cmp eax, 0x2000
sete dl
cmp eax, 0x3000
sete al
or eax, edx
test al, 1
je 0x40e1da
mov eax, ecx
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x30
cmp eax, dword [0x464760]
jle 0x40e169
mov dword [esp + 4], 0x1b0
mov dword [esp], 0x451641
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x50
mov byte [eax + 0x460651], 0x4e
mov byte [eax + 0x460652], 0x14
mov byte [eax + 0x460653], 1
add eax, 4
mov dword [0x460610], eax
or dword [ebp - 0x30], 2
mov ecx, dword [ebp + 0x18]
movzx edx, byte [ecx + 0x11]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
mov eax, dword [0x460610]
add eax, 8
mov dword [0x460610], eax
mov esi, dword [ebp + 0x18]
movzx edx, byte [esi + 0x10]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
add dword [0x460610], 8
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x36
cmp eax, dword [0x464760]
jle 0x40e20a
mov dword [esp + 4], 0x2ac
mov dword [esp], 0x451644
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x54
mov byte [eax + 0x460651], 0x46
mov byte [eax + 0x460652], 0x1a
mov byte [eax + 0x460653], 1
mov byte [eax + 0x460654], 0xe
add eax, 5
mov dword [0x460610], eax
or dword [ebp - 0x30], 0x80
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 0x28]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00401bf0
mov eax, dword [0x460610]
add eax, 7
mov dword [0x460610], eax
mov esi, dword [ebp + 0x18]
mov edx, dword [esi + 0x20]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00401bf0
mov eax, dword [0x460610]
add eax, 7
mov dword [0x460610], eax
mov edx, dword [esi + 0x30]
mov dword [esp + 4], edx
add eax, 0x460650
mov dword [esp], eax
call fcn.00401bf0
mov eax, dword [0x460610]
add eax, 7
mov dword [0x460610], eax
test byte [ebp + 0x1c], 1
je 0x40e308
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x20
cmp eax, dword [0x464760]
jle 0x40e2db
mov dword [esp + 4], 0x2c6
mov dword [esp], 0x451647
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x52
mov byte [eax + 0x460651], 0x45
mov byte [eax + 0x460652], 4
mov byte [eax + 0x460653], 1
add eax, 4
mov dword [0x460610], eax
or dword [ebp - 0x30], 0x40
test byte [ebp + 0x1c], 2
je 0x40e387
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x28
cmp eax, dword [0x464760]
jle 0x40e33e
mov dword [esp + 4], 0x2d0
mov dword [esp], 0x45164a
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x50
mov byte [eax + 0x460651], 0x4c
mov byte [eax + 0x460652], 0xc
mov byte [eax + 0x460653], 1
add eax, 4
mov dword [0x460610], eax
mov dword [esp + 4], 0
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
add dword [0x460610], 8
or dword [ebp - 0x30], 0x20
test byte [ebp + 0x1c], 4
je 0x40e406
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x28
cmp eax, dword [0x464760]
jle 0x40e3bd
mov dword [esp + 4], 0x2dd
mov dword [esp], 0x45164d
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x43
mov byte [eax + 0x460651], 0x4c
mov byte [eax + 0x460652], 0xc
mov byte [eax + 0x460653], 1
add eax, 4
mov dword [0x460610], eax
mov dword [esp + 4], 0
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
add dword [0x460610], 8
or dword [ebp - 0x30], 0x10
cmp dword [0x455114], 0
je 0x40e57c
mov edx, dword [ebp + 0x18]
movzx eax, word [edx + 6]
and eax, 0xf000
cmp eax, 0x8000
jne 0x40e57c
mov esi, 0
mov dword [ebp - 0x38], 1
lea edi, [ebp - 0x28]
cld
mov ecx, 4
mov eax, esi
rep stosd dword es:[edi], eax
mov dword [esp + 4], 0x451650
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x40e4ce
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], 1
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x10
sete al
movzx eax, al
neg eax
and dword [ebp - 0x38], eax
lea esi, [ebp - 0x28]
mov edi, 0x451600
mov ecx, 8
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
sete al
movzx eax, al
neg eax
and dword [ebp - 0x38], eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.00409396
mov esi, eax
movzx edx, byte [ebp - 0x1c]
mov dword [ebp - 0x3c], edx
movzx edi, byte [ebp - 0x1b]
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
jmp 0x40e4e1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov edi, 0
cmp dword [ebp - 0x38], 0
je 0x40e57c
mov eax, dword [0x460610]
sub eax, dword [0x460620]
add eax, dword [0x460630]
add eax, 0x2c
cmp eax, dword [0x464760]
jle 0x40e51b
mov dword [esp + 4], 0x31f
mov dword [esp], 0x451653
call fcn.0040d824
mov eax, dword [0x460610]
mov byte [eax + 0x460650], 0x5a
mov byte [eax + 0x460651], 0x46
mov byte [eax + 0x460652], 0x10
mov byte [eax + 0x460653], 1
mov byte [eax + 0x460654], 0x70
mov byte [eax + 0x460655], 0x7a
movzx ecx, byte [ebp - 0x3c]
mov byte [eax + 0x460656], cl
mov edx, edi
mov byte [eax + 0x460657], dl
add eax, 8
mov dword [0x460610], eax
mov dword [esp + 4], esi
add eax, 0x460650
mov dword [esp], eax
call fcn.00409367
add dword [0x460610], 8
test byte [ebp + 0x1c], 8
je 0x40e596
mov dword [esp + 4], 0x333
mov dword [esp], 0x451656
call fcn.0040d824
movzx ecx, byte [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
mov byte [esi + 0x460650], cl
cmp dword [0x460620], 0
je 0x40e5cb
mov edx, dword [0x460620]
mov eax, dword [0x460610]
sub eax, edx
mov dword [esp + 4], eax
lea edx, [edx + 0x460648]
mov dword [esp], edx
call fcn.00409367
mov eax, dword [0x460610]
mov dword [esp], eax
call fcn.00405785
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x12c], eax
mov eax, dword [0x460610]
mov dword [edx + 0x134], eax
cmp dword [0x460640], 0
je 0x40e5fc
mov eax, dword [0x460640]
jmp 0x40e601
mov eax, dword [0x460610]
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x130], eax
mov edx, dword [ecx + 0x12c]
mov eax, dword [0x460610]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x460650
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [0x460610]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret