Function at 0x401340
Capabilities:
Parse pe header
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x54
mov ebx, dword [ebp + 8]
call fcn.004038b0
cmp ebx, 2
jl 0x402806
mov eax, 1
jmp 0x401388
mov byte [0x40d0a0], 1
xor esi, esi
mov ebx, dword [ebp + 8]
add edi, esi
mov eax, edi
cmp edi, ebx
jge 0x4015de
lea edi, [eax + 1]
xor esi, esi
cmp edi, ebx
jge 0x401398
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + eax*4 + 4]
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ecx + eax*4]
push 2
push 0x40a58c
push ebx
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
je 0x4014d0
push str.__help
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x402806
push 0x40a595
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x402806
push str.__assume_stdcall
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x401370
push 0x40a5a9
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x401370
push str.__include_def_path
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x4014dc
push 0x40a5bf
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x4014dc
push str.__no_forward_output
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x4014f3
push 0x40a600
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x4014f3
push str.__disable_fs_redirector
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x40151e
push 0x40a61b
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x40151e
push 0xc
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [0x40d098], eax
xor esi, esi
test eax, eax
je 0x401379
mov dword [eax + 8], 0
mov ecx, dword [0x40d094]
test ecx, ecx
mov dword [ebp - 0x14], eax
je 0x40152a
mov dword [ecx + 8], eax
jmp 0x40152f
mov byte [0x40d09c], 1
jmp 0x401377
test esi, esi
je 0x4014ff
push esi
call fcn.00403590
add esp, 4
mov esi, 1
jmp 0x401379
mov byte [0x40d0a4], 1
jmp 0x401377
push 2
call dword [0x40d010]
add esp, 4
push ebx
push str.Error:__s_expects_path_as_next_arguement.
push eax
call 0x4028d0
add esp, 0xc
jmp 0x401377
mov byte [0x40d06c], 1
jmp 0x401377
mov dword [0x40d070], eax
push 0x2f
push ebx
call sub.msvcrt.dll_strrchr
add esp, 8
mov dword [ebp - 0x24], eax
push 0x5c
push ebx
call sub.msvcrt.dll_strrchr
add esp, 8
push ebx
mov ebx, eax
call sub.msvcrt.dll__strdup
mov edx, dword [ebp - 0x24]
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
test edx, edx
jne 0x401568
test ebx, ebx
je 0x401568
inc ebx
mov ecx, ebx
jmp 0x40157b
mov ecx, edx
or ecx, ebx
mov ecx, eax
je 0x40157b
test edx, edx
je 0x401578
cmp edx, ebx
jb 0x401563
inc edx
mov ecx, edx
mov dword [ebp - 0x24], ecx
push eax
call sub.msvcrt.dll_strlen
add esp, 4
add eax, 5
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [eax + 4], ebx
push dword [ebp - 0x24]
push ebx
call sub.msvcrt.dll_strcpy
add esp, 8
push 0x2e
mov dword [ebp - 0x24], ebx
push ebx
call sub.msvcrt.dll_strrchr
add esp, 8
test eax, eax
jne 0x4015c7
mov ebx, dword [ebp - 0x24]
push ebx
call sub.msvcrt.dll_strlen
add esp, 4
add eax, ebx
mov byte [eax + 4], 0
mov dword [eax], 0x6665642e
mov eax, dword [ebp - 0x14]
mov dword [0x40d094], eax
jmp 0x401379
movzx eax, byte [0x40d06c]
push eax
call fcn.00403750
add esp, 4
mov edi, dword [0x40d070]
test edi, edi
jne 0x40162b
jmp 0x4027c9
mov esi, dword [edi + 8]
push dword [edi]
call sub.msvcrt.dll_free
add esp, 4
push dword [edi + 4]
call sub.msvcrt.dll_free
add esp, 4
push edi
call sub.msvcrt.dll_free
add esp, 4
mov edi, esi
test esi, esi
je 0x4027c9
mov eax, dword [edi]
mov dword [0x40d074], eax
mov ecx, dword [edi + 4]
mov dword [0x40d078], ecx
push 0x40a623
push eax
call sub.msvcrt.dll_fopen
add esp, 8
test eax, eax
je 0x4016c0
mov esi, eax
push 2
push 0
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
push esi
call sub.msvcrt.dll_ftell
add esp, 4
mov dword [0x40d08c], eax
test eax, eax
je 0x401700
push 0
push 0
push esi
call sub.msvcrt.dll_fseek
add esp, 0xc
mov ebx, dword [0x40d08c]
lea eax, [ebx + 1]
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [0x40d088], eax
test eax, eax
je 0x401700
push esi
push 1
push ebx
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
mov ecx, dword [0x40d088]
cmp eax, 1
jne 0x4016e4
mov eax, dword [0x40d08c]
mov byte [ecx + eax], 0
jmp 0x401700
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d074]
push str.___s__failed_to_open___n
push eax
call 0x4028d0
add esp, 0xc
jmp 0x401805
push ecx
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d088], 0
nop word [eax + eax]
push esi
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [0x40d088]
test eax, eax
je 0x4017e0
mov dword [0x40d090], eax
mov ecx, dword [0x40d08c]
cmp ecx, 0x40
jb 0x4017a0
cmp byte [eax], 0x4d
jne 0x4017a0
cmp byte [eax + 1], 0x5a
jne 0x4017a0
mov edx, dword [eax + 0x3c]
test edx, edx
jle 0x4017a0
cmp edx, ecx
jge 0x4017a0
lea ecx, [eax + edx]
mov dword [0x40d07c], ecx
mov dword [0x40d080], ecx
cmp dword [eax + edx], 0x4550
jne 0x401846
movzx edx, word [ecx + 0x14]
cmp edx, 0xf0
je 0x401882
cmp edx, 0xe0
jne 0x40193c
movzx ecx, word [ecx + 0x18]
cmp ecx, 0x10b
jne 0x40193c
mov esi, 0x40a6a0
mov eax, 0x40d080
jmp 0x40189c
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d074]
push str.___s__not_a_PE___file_n
push eax
call 0x4028d0
add esp, 0xc
push dword [0x40d088]
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d088], 0
jmp 0x401805
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d08c]
push dword [0x40d074]
push str.___s__unable_to_allocate__lu_bytes_n
push eax
call 0x4028d0
add esp, 0x10
mov eax, dword [0x40d084]
test eax, eax
je 0x401817
push eax
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d084], 0
mov eax, dword [0x40d088]
test eax, eax
je 0x401600
push eax
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d088], 0
jmp 0x401600
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d074]
push str.___s__no_PE___signature_n
push eax
call 0x4028d0
add esp, 0xc
push dword [0x40d088]
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d088], 0
jmp 0x40196e
movzx ecx, word [ecx + 0x18]
cmp ecx, 0x20b
jne 0x40193c
mov esi, str.____s__Found_PE_image_n
mov eax, 0x40d07c
mov dword [eax], 0
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d074]
push esi
push eax
call 0x4028d0
add esp, 0xc
mov eax, dword [0x40d07c]
mov edx, dword [0x40d080]
mov ecx, eax
or ecx, edx
je 0x401805
test eax, eax
je 0x401cdf
mov ecx, dword [eax + 0x78]
mov dword [ebp - 0x40], ecx
mov ecx, dword [eax + 0x7c]
mov dword [ebp - 0x48], ecx
mov ebx, dword [eax + 0x80]
mov eax, dword [eax + 0x84]
mov dword [ebp - 0x4c], eax
jmp 0x401909
push esi
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [0x40d0b0]
test esi, esi
je 0x401987
mov eax, dword [esi]
mov dword [0x40d0b0], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x40192a
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401900
push eax
call sub.msvcrt.dll_free
add esp, 4
jmp 0x401900
push eax
call sub.msvcrt.dll_free
add esp, 4
mov dword [0x40d088], 0
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d074]
push str.___s__no_PE___optional_header_n
push eax
call 0x4028d0
add esp, 0xc
mov dword [0x40d080], 0
mov dword [0x40d07c], 0
jmp 0x401805
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x401cd5
cmp dword [ebp - 0x4c], 0
je 0x401cd5
mov eax, dword [0x40d07c]
mov ecx, eax
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x4019b0
mov ecx, dword [0x40d080]
mov dword [ebp - 0x44], ecx
movzx eax, word [ecx + 6]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x401cd5
mov ecx, dword [ebp - 0x44]
movzx eax, word [ecx + 0x14]
add eax, ecx
add eax, 0x18
mov dword [ebp - 0x1c], eax
add eax, 0x14
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x34]
shl ecx, 3
lea eax, [ecx + ecx*4]
mov dword [ebp - 0x24], eax
xor ecx, ecx
jmp 0x4019f3
add ecx, 0x28
cmp dword [ebp - 0x24], ecx
je 0x401cd5
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax + ecx - 0xc]
test ebx, ebx
jne 0x401a02
mov ebx, dword [eax + ecx - 4]
mov esi, dword [eax + ecx - 8]
mov edx, dword [ebp - 0x2c]
mov eax, edx
sub eax, esi
jb 0x4019e7
add esi, ebx
cmp esi, edx
jbe 0x4019e7
cmp dword [ebp - 0x4c], 0x14
jb 0x401cd5
mov edx, dword [0x40d088]
mov dword [ebp - 0x18], edx
add eax, edx
mov edx, dword [ebp - 0x1c]
add eax, dword [edx + ecx + 0x14]
mov dword [ebp - 0x10], eax
je 0x401cd5
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
test edx, edx
je 0x401cd5
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx]
mov eax, ecx
mov dword [ebp - 0x38], ecx
test ecx, ecx
je 0x401cd5
mov dword [ebp - 0x1c], edx
movzx edx, word [ebp - 0x34]
mov ecx, dword [ebp - 0x14]
jmp 0x401a73
add ecx, 0x28
dec edx
je 0x401a9d
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x401a7d
mov eax, dword [ecx - 4]
mov dword [ebp - 0x24], eax
mov esi, dword [ecx - 8]
mov ebx, dword [ebp - 0x1c]
mov eax, ebx
sub eax, esi
jb 0x401a6d
add esi, dword [ebp - 0x24]
cmp esi, ebx
jbe 0x401a6d
add eax, dword [ebp - 0x18]
add eax, dword [ecx]
mov dword [ebp - 0x50], eax
jmp 0x401aa4
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x60], eax
xor eax, eax
mov edx, dword [ebp - 0x14]
jmp 0x401aba
mov eax, dword [ebp - 0x20]
add eax, 4
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x38]
add ecx, eax
movzx eax, word [ebp - 0x34]
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x24], eax
xor ebx, ebx
jmp 0x401aeb
add ebx, 0x28
cmp dword [ebp - 0x24], ebx
mov edx, dword [ebp - 0x14]
je 0x401b15
mov esi, dword [edx + ebx - 0xc]
test esi, esi
jne 0x401af7
mov esi, dword [edx + ebx - 4]
mov edx, dword [edx + ebx - 8]
mov eax, ecx
sub eax, edx
jb 0x401ae0
add edx, esi
cmp edx, ecx
jbe 0x401ae0
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
add eax, dword [edx + ebx]
mov dword [ebp - 0x1c], eax
jmp 0x401b1c
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x60]
mov esi, dword [ebp - 0x20]
add ecx, esi
xor ebx, ebx
mov dword [ebp - 0x58], ecx
jmp 0x401b3b
add ebx, 0x28
cmp dword [ebp - 0x24], ebx
mov edx, dword [ebp - 0x14]
je 0x401b62
mov esi, dword [edx + ebx - 0xc]
test esi, esi
jne 0x401b47
mov esi, dword [edx + ebx - 4]
mov edx, dword [edx + ebx - 8]
mov eax, ecx
sub eax, edx
jb 0x401b30
add edx, esi
cmp edx, ecx
jbe 0x401b30
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
add eax, dword [edx + ebx]
jmp 0x401b64
xor eax, eax
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx]
test ecx, ecx
je 0x401c6f
cmp dword [eax], 0
je 0x401c6f
test ecx, ecx
js 0x401ab4
mov dword [ebp - 0x1c], ecx
add ecx, 2
xor eax, eax
jmp 0x401b9f
add eax, 0x28
cmp dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x14]
je 0x401ab4
mov esi, dword [edx + eax - 0xc]
test esi, esi
jne 0x401bab
mov esi, dword [edx + eax - 4]
mov edx, dword [edx + eax - 8]
mov ebx, ecx
sub ebx, edx
jb 0x401b90
add edx, esi
cmp edx, ecx
jbe 0x401b90
add ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
add ebx, dword [edx + eax]
je 0x401ab4
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x34], eax
mov eax, edx
jmp 0x401be3
add eax, 0x28
mov edx, dword [eax - 0xc]
test edx, edx
mov ecx, dword [ebp - 0x1c]
jne 0x401bf0
mov edx, dword [eax - 4]
mov esi, dword [eax - 8]
mov ebx, ecx
sub ebx, esi
jb 0x401be0
add esi, edx
cmp esi, ecx
jbe 0x401be0
mov esi, dword [ebp - 0x34]
add esi, dword [ebp - 0x58]
mov eax, dword [eax]
add ebx, dword [ebp - 0x18]
movzx eax, word [eax + ebx]
mov word [ebp - 0x1c], ax
push 0x12
push 1
call sub.msvcrt.dll_calloc
add esp, 8
mov ebx, eax
push dword [ebp - 0x50]
call sub.msvcrt.dll__strdup
add esp, 4
mov dword [ebx + 8], eax
push dword [ebp - 0x24]
call sub.msvcrt.dll__strdup
add esp, 4
mov dword [ebx + 0xc], eax
movzx eax, word [ebp - 0x1c]
mov word [ebx + 0x10], ax
mov dword [ebx + 4], esi
mov eax, dword [ebp - 0x3c]
mov dword [ebx], eax
mov dword [0x40d0b0], ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
movzx eax, word [eax + 6]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], ebx
mov edx, dword [ebp - 0x14]
jmp 0x401ab4
mov eax, dword [ebp - 0x4c]
add eax, 0xffffffec
mov dword [ebp - 0x4c], eax
cmp eax, 0x14
jb 0x401cd5
cmp word [ebp - 0x34], 0
je 0x401cd5
add dword [ebp - 0x2c], 0x14
movzx eax, word [ebp - 0x34]
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x24], eax
xor eax, eax
jmp 0x401ca1
add eax, 0x28
cmp dword [ebp - 0x24], eax
je 0x401cd5
mov esi, dword [ebp - 0x14]
mov edx, dword [esi + eax - 0xc]
test edx, edx
jne 0x401cb0
mov edx, dword [esi + eax - 4]
mov esi, dword [esi + eax - 8]
mov ecx, dword [ebp - 0x2c]
mov ebx, ecx
sub ebx, esi
jb 0x401c99
add esi, edx
cmp esi, ecx
jbe 0x401c99
add ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
add ebx, dword [ecx + eax]
mov dword [ebp - 0x10], ebx
jne 0x401a41
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
push 0
jmp 0x401ced
mov ecx, dword [edx + 0x88]
mov edx, dword [edx + 0x8c]
push 1
call fcn.004028f0
add esp, 4
mov eax, dword [0x40d084]
test eax, eax
je 0x40180a
cmp dword [0x40d0ac], 0
je 0x40180a
cmp byte [0x40d09c], 0
je 0x401d25
push 1
call dword [0x40d010]
add esp, 4
jmp 0x401d38
push 0x40a6f5
push dword [0x40d078]
call sub.msvcrt.dll_fopen
add esp, 8
mov ebx, eax
test eax, eax
je 0x40279c
push dword [0x40d084]
push str.__n__Definition_file_of__s_n__Automatic_generated_by_gendef_n__written_by_Kai_Tietz_2008_n__n
push ebx
call 0x4028d0
add esp, 0xc
push dword [0x40d084]
push str.LIBRARY___s__nEXPORTS_n
push ebx
call 0x4028d0
add esp, 0xc
mov ecx, dword [0x40d0ac]
test ecx, ecx
je 0x402777
mov dword [ebp - 0x44], ebx
jmp 0x401dc6
movzx eax, word [ebx + 0x10]
push eax
push dword [ebx + 8]
push dword [ebx + 0xc]
push str.___Check____forwards_to__s_in__s__ordinal__u_
push esi
call 0x4028d0
mov edx, dword [ebp - 0x2c]
add esp, 0x14
nop dword [eax]
mov ebx, esi
push esi
push 0xa
mov esi, edx
call sub.msvcrt.dll_fputc
add esp, 8
push esi
call sub.msvcrt.dll_free
add esp, 4
mov ecx, dword [0x40d0ac]
test ecx, ecx
je 0x402777
mov eax, dword [ecx]
mov dword [0x40d0ac], eax
mov esi, dword [ecx + 4]
cmp byte [esi], 0
je 0x401e09
push 0x2e
push esi
mov ebx, ecx
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
mov eax, 0x40a78a
mov ecx, 0x40a6f4
cmove eax, ecx
push eax
push esi
push eax
push str._s_s_s
mov eax, dword [ebp - 0x44]
mov esi, eax
push eax
call 0x4028d0
add esp, 0x14
jmp 0x401e1e
push dword [ecx + 0xc]
push str.ord__u
mov esi, ebx
push ebx
mov ebx, ecx
call 0x4028d0
add esp, 0xc
mov eax, dword [ebx + 4]
cmp byte [eax], 0x3f
mov edx, ebx
mov dword [ebp - 0x2c], ebx
jne 0x401e50
cmp byte [eax + 1], 0x3f
jne 0x401e50
push 4
push str.___7
push eax
call sub.msvcrt.dll_strncmp
mov edx, dword [ebp - 0x2c]
add esp, 0xc
test eax, eax
jne 0x401e50
mov dword [edx + 0x1c], 1
nop
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x14], 1
xor ebx, ebx
test eax, eax
jne 0x402580
xor eax, eax
cmp dword [edx + 0x18], 0
je 0x401e73
xor ebx, ebx
jmp 0x402580
mov ebx, dword [edx + 0x10]
test ebx, ebx
je 0x40252b
push 0x20
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 0x58], eax
push 0x10
call sub.msvcrt.dll_malloc
add esp, 4
mov esi, eax
mov dword [eax], 8
push 0x20
call sub.msvcrt.dll_malloc
add esp, 4
mov ecx, eax
mov dword [esi + 8], eax
mov eax, dword [0x40d07c]
test eax, eax
je 0x402511
movzx eax, word [eax + 4]
cmp eax, 0x14c
jne 0x402511
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x14], 0xffffffff
mov dword [esi + 4], 1
mov dword [ecx], ebx
mov edx, ecx
xor ebx, ebx
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x48], 8
mov dword [ebp - 0x4c], 8
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x10], esi
jmp 0x401f2b
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x40]
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
mov eax, dword [ebp - 0x48]
mov dword [esi], eax
mov eax, dword [esi + 0xc]
cmp eax, ecx
je 0x402534
mov dword [ebp - 0x20], ebx
lea ecx, [eax + 1]
mov dword [esi + 0xc], ecx
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x34]
test edx, edx
mov ecx, dword [ebp - 0x58]
je 0x401f61
xor eax, eax
mov ebx, dword [ebp - 0x1c]
cmp dword [ecx + eax*4], ebx
je 0x402506
inc eax
cmp edx, eax
jne 0x401f50
mov esi, dword [ebp - 0x4c]
cmp esi, edx
jne 0x401fb1
lea eax, [esi*4]
mov dword [ebp - 0x24], eax
lea eax, [esi*4 + 0x20]
push eax
mov ebx, ecx
mov dword [ebp - 0x34], edx
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 0x14], eax
push dword [ebp - 0x24]
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add esi, 8
mov dword [ebp - 0x4c], esi
push ebx
mov ebx, dword [ebp - 0x20]
call sub.msvcrt.dll_free
mov edx, dword [ebp - 0x34]
add esp, 4
mov ecx, dword [ebp - 0x14]
jmp 0x401fb4
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], ecx
mov dword [ecx + edx*4], eax
mov eax, dword [0x40d07c]
test eax, eax
jne 0x401fcb
mov eax, dword [0x40d080]
inc edx
mov dword [ebp - 0x34], edx
movzx ecx, word [eax + 6]
test ecx, ecx
je 0x401f0c
mov dword [ebp - 0x20], ebx
movzx edx, word [eax + 0x14]
add eax, edx
add eax, 0x18
mov edx, dword [0x40d088]
mov dword [ebp - 0x60], edx
add eax, 0x14
shl ecx, 3
lea ecx, [ecx + ecx*4]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 0
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x54], 1
mov dword [ebp - 0x14], eax
xor ecx, ecx
jmp 0x40202f
add ecx, 0x28
cmp dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x14]
je case.default.0x4020bb
mov edx, dword [eax + ecx - 0xc]
test edx, edx
jne 0x40203b
mov edx, dword [eax + ecx - 4]
mov eax, dword [eax + ecx - 8]
mov ebx, esi
sub ebx, eax
jb 0x402020
add eax, edx
cmp eax, esi
jbe 0x402020
add ebx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x14]
add ebx, dword [eax + ecx]
je case.default.0x4020bb
movzx ecx, byte [ebx]
movzx edx, cl
lea eax, [edx - 0x26]
cmp eax, 0x41
ja case.default.0x402068
jmp dword [eax*4 + 0x40a04c]
xor dword [ebp - 0x3c], 1
jmp case.0x402068.38
add edx, 0xffffff10
cmp edx, 3
ja case.0x402068.39
cmp edx, 1
jne case.0x402068.38
jmp case.0x402068.39
xor dword [ebp - 0x54], 1
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
lea esi, [ecx + eax]
inc esi
inc ecx
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x14]
jmp 0x402017
mov edx, 0x40a85c
movzx eax, cl
mov ebx, dword [edx + eax*4]
cmp ebx, 0x1c
ja case.default.0x4020bb
mov edx, dword [ebp - 0x38]
lea ecx, [edx + 1]
jmp dword [ebx*4 + 0x40a154]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
add ecx, eax
xor esi, esi
jmp 0x4020da
add esi, 0x28
cmp dword [ebp - 0x24], esi
je case.default.0x4020bb
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + esi - 0xc]
test edx, edx
jne 0x4020e9
mov edx, dword [eax + esi - 4]
mov eax, dword [eax + esi - 8]
mov ebx, ecx
sub ebx, eax
jb 0x4020ce
add eax, edx
cmp eax, ecx
jbe 0x4020ce
add ebx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x14]
add ebx, dword [eax + esi]
je case.default.0x4020bb
movzx ecx, byte [ebx]
mov edx, 0x40ac5c
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
jmp 0x4020a6
add ecx, dword [ebp - 0x1c]
call fcn.00402f70
test eax, eax
je case.default.0x4020bb
mov ecx, dword [ebp - 0x38]
add ecx, 2
mov dword [ebp - 0x28], ecx
movzx eax, byte [eax]
mov byte [ebp - 0x14], al
movzx ecx, al
cmp dword [ebp - 0x54], 0
je 0x4021d6
mov esi, ecx
mov eax, ecx
not eax
test al, 0xc0
je 0x402188
mov eax, esi
and eax, 7
cmp eax, 4
jne 0x402188
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x1c]
call fcn.00402f70
test eax, eax
je case.default.0x4020bb
mov ecx, esi
and ecx, 0xfffffff8
movzx eax, byte [eax]
and eax, 7
or ecx, eax
mov eax, dword [ebp - 0x38]
add eax, 3
mov dword [ebp - 0x28], eax
mov esi, ecx
mov eax, ecx
mov byte [ebp - 0x14], cl
mov eax, esi
and eax, 0xffffffc7
cmp eax, 5
jne 0x4022a5
cmp ebx, 0xf
jne 0x4022c7
or esi, 8
and esi, 0x38
cmp esi, 0x28
jne 0x4022c7
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
add ecx, eax
call fcn.00402f70
mov ecx, dword [eax]
mov eax, 0x40d0b0
mov eax, dword [eax]
test eax, eax
je 0x4022c7
cmp dword [eax + 4], ecx
jne 0x4021c2
jmp 0x4022ca
and ecx, 0xffffffc0
cmp ecx, 0x80
je 0x402382
mov eax, ecx
cmp eax, 0x40
je 0x40237a
test eax, eax
jne 0x40238b
movzx eax, byte [ebp - 0x14]
and al, 7
mov ecx, dword [ebp - 0x38]
add ecx, 4
cmp al, 6
mov eax, dword [ebp - 0x28]
cmove eax, ecx
jmp 0x402388
xor eax, eax
cmp dword [ebp - 0x54], 0
setne al
lea ecx, [edx + eax*2]
add ecx, 3
jmp case.0x4020bb.3
add ecx, dword [ebp - 0x1c]
call fcn.00402f70
test eax, eax
je case.default.0x4020bb
movzx eax, byte [eax]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x38]
add ecx, edx
add ecx, 2
add edx, 2
mov dword [ebp - 0x30], ecx
lea ecx, [eax - 0x100]
test al, al
cmovns ecx, eax
add dword [ebp - 0x30], ecx
mov ecx, edx
jmp case.0x4020bb.3
add ecx, dword [ebp - 0x1c]
call fcn.00402f70
test eax, eax
je case.default.0x4020bb
cmp dword [ebp - 0x3c], 0
je 0x402334
mov eax, dword [eax]
mov ecx, 5
jmp 0x402356
add ecx, dword [ebp - 0x1c]
call fcn.00402f70
test eax, eax
je case.default.0x4020bb
movzx eax, word [eax]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x38]
add ecx, 3
jmp case.0x4020bb.3
movzx eax, byte [ebp - 0x14]
and al, 0xc0
cmp al, 0x80
je 0x402374
movzx eax, al
cmp eax, 0x40
jne 0x40238b
inc dword [ebp - 0x28]
jmp 0x40238b
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x28], 4
mov dword [ebp - 0x20], eax
jmp 0x40238b
xor eax, eax
cmp dword [ebp - 0x3c], 0
setne al
lea ecx, [edx + eax*2]
add ecx, 3
mov ebx, 2
jmp case.0x4020bb.3
xor eax, eax
cmp dword [ebp - 0x3c], 0
setne al
lea ecx, [edx + eax*2]
add ecx, 5
mov ebx, 0x16
jmp case.0x4020bb.3
inc ecx
inc ecx
jmp case.0x4020bb.3
add edx, 2
inc edx
inc edx
mov ecx, edx
jmp case.0x4020bb.3
xor eax, eax
cmp dword [ebp - 0x3c], 0
setne al
lea ecx, [edx + eax*2]
add ecx, 5
mov ebx, 0x13
jmp case.0x4020bb.3
movzx eax, word [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov ecx, 3
test ax, ax
jns 0x402359
mov eax, dword [ebp - 0x30]
mov ecx, 0xffff0000
or eax, ecx
mov ecx, 3
mov dword [ebp - 0x30], eax
add ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x1c]
add eax, ecx
add dword [ebp - 0x30], eax
cmp ebx, 0xd
mov eax, 0xc
cmove ebx, eax
jmp case.0x4020bb.3
add dword [ebp - 0x28], 4
jmp 0x40238b
mov eax, dword [ebp - 0x38]
add eax, 3
jmp 0x402388
mov eax, dword [ebp - 0x38]
add eax, 4
mov dword [ebp - 0x28], eax
cmp ebx, 0xf
je 0x4023c0
mov eax, ebx
cmp ebx, 0xb
je 0x4023b5
cmp ebx, 0xa
jne 0x4023f4
xor eax, eax
cmp dword [ebp - 0x3c], 0
setne al
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx + eax*2]
add ecx, 2
mov ebx, 0xa
jmp case.0x4020bb.3
mov ecx, dword [ebp - 0x28]
inc ecx
mov ebx, 0xb
jmp case.0x4020bb.3
movzx ecx, byte [ebp - 0x14]
and cl, 0x38
cmp cl, 0x20
je 0x402466
mov eax, ecx
movzx eax, cl
cmp eax, 0x28
je 0x402466
cmp eax, 0x38
je case.default.0x4020bb
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
mov ebx, 0xf
jmp 0x402424
mov eax, ebx
and eax, 0xfffffffe
cmp eax, 0x10
jne 0x402473
and byte [ebp - 0x14], 0x30
jne 0x402473
xor eax, eax
cmp dword [ebp - 0x3c], 0
setne al
cmp ebx, 0x11
lea eax, [eax + eax + 2]
mov ecx, 1
cmovne eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
mov esi, dword [ebp - 0x10]
cmp ebx, 0xffffffff
mov edx, dword [ebp - 0x34]
je case.0x402454.19
test ecx, ecx
je case.0x402454.19
inc dword [ebp - 0x50]
add ecx, dword [ebp - 0x1c]
add ebx, 0xfffffff4
mov eax, ecx
mov dword [ebp - 0x1c], ecx
cmp ebx, 0x10
ja case.0x402454.13
mov eax, ecx
mov dword [ebp - 0x1c], ecx
jmp dword [ebx*4 + 0x40a1c8]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
jmp case.0x402454.13
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
mov ebx, 0x18
jmp 0x402424
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
jmp 0x402424
mov ebx, ecx
mov esi, dword [ebp - 0x30]
cmp dword [ebp - 0x40], 0
mov ecx, dword [ebp - 0x18]
je 0x4024a3
xor eax, eax
cmp dword [ecx + eax*4], esi
je 0x402498
inc eax
cmp dword [ebp - 0x40], eax
jne 0x40248b
jmp 0x4024a3
mov dword [ebp - 0x1c], ebx
mov esi, dword [ebp - 0x10]
jmp 0x401f44
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x48], eax
jne 0x4024ef
mov eax, dword [ebp - 0x48]
lea ecx, [eax*4]
mov dword [ebp - 0x24], ecx
lea eax, [eax*4 + 0x20]
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 0x14], eax
push dword [ebp - 0x24]
push dword [ebp - 0x18]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add dword [ebp - 0x48], 8
push dword [ebp - 0x18]
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x40]
mov dword [edx + eax*4], esi
inc eax
mov dword [ebp - 0x40], eax
mov esi, dword [ebp - 0x10]
mov eax, ebx
jmp 0x401f3e
mov dword [ebp - 0x34], edx
mov ebx, dword [ebp - 0x20]
jmp 0x401f0f
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x14], 0
xor ebx, ebx
mov dword [ebp - 0x14], 0
xor eax, eax
mov esi, dword [ebp - 0x44]
jmp 0x40256e
xor eax, eax
xor ebx, ebx
mov esi, dword [ebp - 0x44]
jmp 0x402580
mov dword [ebp - 0x14], 0
mov esi, dword [ebp - 0x44]
push dword [ebp - 0x58]
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 0x10]
push dword [eax + 8]
call sub.msvcrt.dll_free
add esp, 4
push dword [ebp - 0x10]
call sub.msvcrt.dll_free
add esp, 4
xor eax, eax
cmp dword [ebp - 0x50], 0
sete al
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x1c], eax
nop word cs:[eax + eax]
cmp dword [edx + 0x18], 0
je 0x4025a8
or eax, dword [edx + 0x10]
jne 0x4025f0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x30]
push eax
push 0
push dword [edx + 8]
jmp 0x4025ce
cmp dword [edx + 0x14], 0xffffffff
jne 0x402586
test ebx, ebx
je 0x402586
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 0xc]
push dword [ebx + 8]
call fcn.004030b0
mov edx, dword [ebp - 0x2c]
add esp, 0x10
test eax, eax
je 0x4025f0
mov eax, dword [ebp - 0x30]
mov dword [edx + 0x1c], eax
test eax, eax
jne 0x4025f0
mov eax, dword [ebp - 0x5c]
mov dword [edx + 0x14], eax
nop dword [eax]
cmp dword [edx + 0x18], 0
je 0x4026c3
mov dword [edx + 0x14], 0
cmp dword [edx + 0x10], 0
jne 0x402624
test byte [0x40d0a4], 1
jne 0x402624
push dword [edx + 8]
push str.___s
push esi
call 0x4028d0
mov edx, dword [ebp - 0x2c]
add esp, 0xc
mov eax, dword [edx + 4]
cmp byte [eax], 0
jne 0x402640
push dword [edx + 0xc]
push str.___u
push esi
call 0x4028d0
mov edx, dword [ebp - 0x2c]
add esp, 0xc
cmp dword [edx + 0x1c], 0
je 0x40265b
push esi
push 1
push 5
push str._DATA
call sub.msvcrt.dll_fwrite
mov edx, dword [ebp - 0x2c]
add esp, 0x10
cmp dword [edx + 0x14], 0xffffffff
jne 0x401da0
mov eax, dword [0x40d07c]
test eax, eax
je 0x401da0
movzx eax, word [eax + 4]
cmp eax, 0x14c
jne 0x401da0
test ebx, ebx
jne 0x401d7d
cmp dword [edx + 0x10], 0
jne 0x402695
cmp dword [edx + 0x1c], 0
je 0x402714
cmp dword [ebp - 0x14], 0
jne 0x401da0
cmp dword [edx + 0x1c], 0
jne 0x401da0
push esi
push 1
push 0x51
push str.___Check____Couldnt_determine_function_argument_count._Function_doesnt_return.
call sub.msvcrt.dll_fwrite
mov edx, dword [ebp - 0x2c]
add esp, 0x10
jmp 0x401da0
mov eax, dword [edx + 0x14]
cmp eax, 0xffffffff
je 0x402601
mov ecx, dword [0x40d07c]
test ecx, ecx
je 0x402601
movzx ecx, word [ecx + 4]
cmp ecx, 0x14c
jne 0x402601
mov ecx, dword [edx + 4]
cmp byte [ecx], 0x3f
jne 0x4026fd
push eax
push str.___has_WINAPI____u_
jmp 0x402703
push eax
push 0x40a7ac
push esi
call 0x4028d0
add esp, 0xc
mov edx, dword [ebp - 0x2c]
jmp 0x402601
push dword [edx + 8]
push str.___Check____forwards_to__s
push esi
call 0x4028d0
mov edx, dword [ebp - 0x2c]
add esp, 0xc
jmp 0x401da0
mov eax, dword [ebp - 0x40]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x48]
mov dword [esi], eax
xor eax, eax
cmp byte [0x40d0a0], 0
jne 0x40275f
jmp 0x402765
mov eax, dword [ebp - 0x40]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x48]
mov dword [esi], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x14], eax
mov dword [ebp - 0x14], 1
mov esi, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x20]
jmp 0x40253e
mov dword [0x40d0a8], 0
cmp byte [0x40d09c], 0
jne 0x401805
push ebx
call sub.msvcrt.dll_fclose
add esp, 4
jmp 0x401805
push 2
call dword [0x40d010]
add esp, 4
push dword [0x40d078]
push str.__failed_to_create__s_..._n
jmp 0x4016d6
push esi
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [0x40d0b0]
test esi, esi
je 0x4027fc
mov eax, dword [esi]
mov dword [0x40d0b0], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x4027ea
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4027c0
push eax
call sub.msvcrt.dll_free
add esp, 4
jmp 0x4027c0
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret
call 0x402810
nop dword [eax + eax]
push esi
mov esi, dword [fcn.00404030]
push 2
call esi
add esp, 4
push eax
push 1
push 0x23
push str.Usage:_gendef__OPTION_...__DLL_..._n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call esi
add esp, 4
push eax
push 1
push 0x3a
push str.Dumps_DLL_exports_information_from_PE32_PE32_executables_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call esi
add esp, 4
push eax
push 0xa
call sub.msvcrt.dll_fputc
add esp, 8
push 2
call esi
add esp, 4
push eax
push 1
push 0x231
push str.Options:_n___________________________Dump_to_stdout_n___h____help_______________Show_this_help._n___a____assume_stdcall_____Assume_functions_with_ambiguous_call_n___________________________convention_as_stdcall._n___I____include_def_path__path__n___________________________Add_additional_search_paths_to_find_n___________________________hint_.def_files._n___f____no_forward_output__Dont_output_forwarders_in_.def_file_n___r____disable_fs_redirector_n___________________________Disable_Win64_FS_redirection__for_32_bit_n___________________________gendef_on_64_bit_Windows_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call esi
add esp, 4
push eax
push 0xa
call sub.msvcrt.dll_fputc
add esp, 8
push 2
call esi
add esp, 4
push eax
push 1
push 0xb4
push str.Usage_example:__n__By_default__the_output_files_are_named_after_their_DLL_counterparts_n__gendef_MYDLL.DLL_____Produces_MYDLL.def_n__gendef___MYDLL.DLL___Prints_the_exports_to_stdout_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call esi
add esp, 4
push eax
push 1
push 0x39
push str._nReport_bugs_to__mingw_w64_public_lists.sourceforge.net__n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 0
call sub.msvcrt.dll_exit
nop word cs:[eax + eax]
push eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
mov dword [esp], edx
push edx
push ecx
push eax
call fcn.00403fc0
add esp, 0xc
pop eax
ret