Function at 0x401000
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x8b0
cmp eax, 1
push ebx
push ebp
push esi
push edi
jne 0x401048
call fcn.004c1311
test eax, eax
je 0x40102a
call fcn.004c1240
call fcn.004c1311
test eax, eax
jne 0x40101c
call fcn.00402390
mov eax, dword [esp + 0x8c8]
mov ecx, dword [eax]
push ecx
call fcn.004023e0
add esp, 4
push 0
call fcn.004b198f
lea edx, [esp + 0xa0]
push edx
call fcn.004084f0
add esp, 4
mov esi, str.3.72
lea eax, [esp + 0xa0]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40108c
test cl, cl
je 0x401088
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40108c
add eax, 2
add esi, 2
test cl, cl
jne 0x401064
xor eax, eax
jmp 0x401091
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4010ae
push str.Bad_version_of_libformat
push 0x504950
call fcn.004b1877
add esp, 8
push 0
call fcn.004b198f
call fcn.00408520
mov ebx, dword [esp + 0x8c8]
mov esi, str._help
mov edi, dword [ebx + 4]
lea ebp, [ebx + 4]
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4010eb
test cl, cl
je 0x4010e7
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4010eb
add eax, 2
add esi, 2
test cl, cl
jne 0x4010c7
xor eax, eax
jmp 0x4010f0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40110b
call fcn.00402390
mov eax, dword [ebx]
push eax
call fcn.004040c0
add esp, 4
push 0
call fcn.004b198f
mov esi, str._code
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401136
test cl, cl
je 0x401132
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401136
add eax, 2
add esi, 2
test cl, cl
jne 0x401112
xor eax, eax
jmp 0x40113b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40114b
call fcn.00402390
push 0
call fcn.004b198f
mov edi, dword [esp + 0x8c4]
push ebp
lea eax, [edi - 1]
push eax
call fcn.00402440
add esp, 8
cmp word [0x5086ca], 0
mov esi, eax
jne 0x401170
call fcn.00402390
cmp word [0x5086d2], 0
je 0x4011d2
cmp word [0x4f2392], 0xffff
je 0x4011d2
push str.tiff
call fcn.00408a90
movsx ecx, word [0x4f2392]
add esp, 4
cmp ecx, eax
je 0x4011cc
push 0x4f2db0
call fcn.00408a90
movsx edx, word [0x4f2392]
add esp, 4
cmp edx, eax
je 0x4011cc
push 0x4f2dac
call fcn.00408a90
movsx ecx, word [0x4f2392]
add esp, 4
cmp ecx, eax
jne 0x4011d2
mov ax, 1
jmp 0x4011d5
xor ax, ax
test ax, ax
mov word [0x5086d2], ax
mov dword [esp + 0x10], 0
je 0x4012d9
lea edx, [esp + 0x18]
push edx
call fcn.00404c40
mov ax, word [0x5086cc]
mov cx, word [0x4f2394]
mov dx, word [0x4f2396]
mov word [esp + 0x3c], ax
mov ax, word [0x5086d6]
mov word [esp + 0x3e], cx
movsx cx, byte [0x5086f2]
mov word [esp + 0x42], ax
mov word [esp + 0x40], dx
movsx ax, byte [0x5086f1]
movsx dx, byte [0x5086f0]
mov word [esp + 0x4a], ax
mov ax, word [0x4f2392]
mov word [esp + 0x48], cx
mov cx, word [0x5086dc]
add esp, 4
cmp ax, 0xffff
mov word [esp + 0x48], dx
mov word [esp + 0x4c], cx
jne 0x401273
push str.tiff
call fcn.00408a90
add esp, 4
mov cx, word [0x4f23b0]
mov word [esp + 0x1a], ax
cmp cx, 0xffff
je 0x401293
movsx eax, word [0x5086e8]
movsx edx, cx
sub eax, edx
jmp 0x401297
mov eax, edi
sub eax, esi
mov edx, dword [0x5086ec]
lea ecx, [esp + 0x18]
inc eax
push ecx
push eax
lea eax, [esp + 0x18]
push edx
push eax
call fcn.00409a50
add esp, 0x10
test ax, ax
je 0x4012d9
mov ecx, dword [0x5086ec]
push 0
push eax
push 0
push ecx
call fcn.00401590
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8b0
ret
cmp esi, edi
jge 0x40154c
mov eax, dword [esp + 0x8c4]
lea ebx, [ebx + esi*4]
sub eax, esi
mov dword [esp + 0x14], eax
mov ax, word [0x4f23b0]
cmp ax, 0xffff
je 0x40144d
movsx edx, word [0x5086e8]
movsx ebp, ax
cmp ebp, edx
jg 0x40153a
mov byte [esp + 0x4c0], 0
mov eax, dword [ebx]
push ebp
lea ecx, [esp + 0x4c4]
push eax
push ecx
call fcn.00404a50
mov eax, dword [0x5086ec]
add esp, 0xc
test eax, eax
je 0x4013ac
lea edx, [esp + 0x4c0]
push 0x2f
push edx
call fcn.004b1850
add esp, 8
test eax, eax
jne 0x40136b
lea eax, [esp + 0x4c0]
push 0x5c
push eax
call fcn.004b1850
add esp, 8
lea edi, [esp + 0x4c0]
test eax, eax
je 0x40136e
lea edi, [eax + 1]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xc0]
mov eax, ecx
mov esi, edi
mov edi, edx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x5086ec]
push ecx
push edx
call fcn.00404a50
add esp, 0xc
jmp 0x4013d7
lea edi, [esp + 0x4c0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401401
movsx edx, word [0x5086d8]
mov ecx, dword [0x5086ec]
push eax
push ecx
lea eax, [esp + 0x4c8]
push edx
push eax
call fcn.00402360
add esp, 0x10
jmp 0x401430
cmp word [0x5086da], 0
je 0x401410
or eax, 0xffffffff
jmp 0x401417
movsx eax, word [0x5086d8]
lea ecx, [esp + 0xc0]
lea edx, [esp + 0x4c0]
push ecx
push eax
push edx
call fcn.004017d0
add esp, 0xc
movsx eax, word [0x4f23b2]
movsx ecx, word [0x5086e8]
add ebp, eax
cmp ebp, ecx
jle 0x401313
jmp 0x40153a
mov eax, dword [0x5086ec]
test eax, eax
je 0x4014c5
mov edx, dword [ebx]
push 0x2f
push edx
call fcn.004b1850
add esp, 8
test eax, eax
jne 0x401483
mov eax, dword [ebx]
push 0x5c
push eax
call fcn.004b1850
add esp, 8
test eax, eax
jne 0x401483
mov edi, dword [ebx]
lea edx, [esp + 0xc0]
jmp 0x40148d
lea edi, [eax + 1]
lea edx, [esp + 0xc0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x5086ec]
push ecx
push edx
call fcn.00404a50
add esp, 0xc
jmp 0x4014eb
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401510
movsx edx, word [0x5086d8]
mov ecx, dword [0x5086ec]
push eax
mov eax, dword [ebx]
push ecx
push edx
push eax
call fcn.00402360
add esp, 0x10
jmp 0x40153a
cmp word [0x5086da], 0
je 0x40151f
or eax, 0xffffffff
jmp 0x401526
movsx eax, word [0x5086d8]
mov edx, dword [ebx]
lea ecx, [esp + 0xc0]
push ecx
push eax
push edx
call fcn.004017d0
add esp, 0xc
mov eax, dword [esp + 0x14]
add ebx, 4
dec eax
mov dword [esp + 0x14], eax
jne 0x4012f1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40155d
push eax
call fcn.00409c50
add esp, 4
mov eax, dword [0x5086c0]
test eax, eax
je 0x40156f
push eax
call fcn.004b17e0
add esp, 4
call fcn.004085c0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8b0
ret