Function at 0x40a500
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
mov ecx, str.Unknown_pragma
lea edx, [ebp - 0x36]
mov esi, 0x1e
push ebx
mov eax, edx
sub esp, 0x7c
test al, 2
jne 0x40a988
mov eax, esi
and eax, 0xfffffffc
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x5c], ebx
mov ebx, dword [ecx + eax]
mov dword [edx + eax], ebx
mov ebx, dword [ebp - 0x5c]
add eax, 4
cmp eax, ebx
jb 0x40a52e
add edx, eax
add ecx, eax
and esi, 2
je 0x40a54d
movzx eax, word [ecx]
mov word [edx], ax
mov dword [esp], 1
mov edx, str.internal
mov dword [esp + 4], edx
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
jne 0x40a610
mov dword [esp], 2
mov eax, 0x4ad976
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
jne 0x40a8e0
mov dword [esp], 3
mov ecx, dword [ebp + 8]
call fcn.0041c750
sub esp, 4
mov esi, eax
mov dword [esp], 4
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c420
mov ebx, eax
mov eax, dword [ebp - 0x44]
sub esp, 8
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, str._x__d_n
mov dword [esp + 4], eax
call fcn.00402fc0
mov eax, dword [ebp - 0x44]
lea ecx, [edi + 8]
test eax, eax
jne 0x40a808
mov dword [esp], esi
mov eax, 0x4ab0a2
mov dword [esp + 4], eax
call fcn.0044b920
sub esp, 8
mov dword [ebp - 0x60], 0
jmp 0x40a684
mov dword [esp], 1
mov eax, str.verifyloadimage
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
jne 0x40a698
mov dword [esp], 2
mov ecx, dword [ebp + 8]
call fcn.0041c750
sub esp, 4
mov dword [esp], eax
call fcn.0042a320
test al, al
jne 0x40a600
mov dword [esp], 2
mov ecx, dword [ebp + 8]
call fcn.0041c750
sub esp, 4
mov dword [esp + 0xc], eax
mov eax, str.Unsupported_format__ls
mov dword [esp + 8], eax
mov eax, 0x13b0
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00407980
mov dword [ebp - 0x60], 0x64
mov eax, dword [ebp - 0x60]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp], 1
mov esi, str.verifychm
mov dword [esp + 4], esi
mov ecx, dword [ebp + 8]
call fcn.0041c780
mov dword [ebp - 0x60], eax
sub esp, 8
test eax, eax
je 0x40a820
mov dword [esp], 1
mov ecx, str.whip
mov dword [esp + 4], ecx
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
je 0x40af69
mov dword [esp], 1
mov esi, 0x4adacc
mov dword [esp + 4], esi
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
inc eax
je 0x40ab88
mov dword [esp], 2
mov edx, str.error
mov dword [esp + 4], edx
mov ecx, dword [ebp + 8]
call fcn.0041c780
mov dword [ebp - 0x64], eax
sub esp, 8
test eax, eax
js 0x40aed8
cmp dword [ebp - 0x64], 5
je 0x40ae70
cmp dword [ebp - 0x64], 6
je 0x40aef8
mov dword [ebp - 0x60], 0
mov eax, 3
mov dword [ebp - 0x5c], eax
jmp 0x40a791
test eax, eax
je 0x40a7e4
mov eax, dword [ebp - 0x5c]
mov ebx, 0x17d5
mov dword [esp], eax
mov ecx, dword [ebp + 8]
call fcn.0041c750
mov ecx, 0x4adb7c
sub esp, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00407980
mov dword [ebp - 0x60], 0x64
inc dword [ebp - 0x5c]
mov ecx, dword [ebp + 8]
call fcn.0041c390
cmp dword [ebp - 0x5c], eax
jge 0x40a684
xor eax, eax
mov dword [esp + 4], eax
mov ebx, dword [ebp - 0x5c]
mov dword [esp], ebx
mov ecx, dword [ebp + 8]
call fcn.0041c3e0
sub esp, 8
mov esi, eax
mov dword [esp], ebx
mov eax, 0x4adb70
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c780
lea edx, [esi - 0x3e8]
sub esp, 8
cmp edx, 0x2327
ja 0x40a750
mov edx, dword [ebp - 0x64]
cmp edx, 4
ja case.default.0x40a7fe
mov ebx, dword [edi + 0x827c]
lea ecx, [edi + 0x8278]
test eax, eax
jmp dword [edx*4 + 0x4adba8]
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.0044ba10
sub esp, 8
jmp 0x40a600
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x48], 0
mov dword [esp], 2
mov ecx, dword [ebp + 8]
call fcn.0041c750
sub esp, 4
mov ebx, 0x4ada4c
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0044ebb0
mov dword [esp], eax
mov ecx, 0xfffd
mov edx, 1
mov dword [esp + 4], ecx
lea ecx, [ebp - 0x4c]
mov dword [esp + 8], edx
call fcn.0044d270
sub esp, 0xc
test al, al
je 0x40a8a1
mov eax, dword [ebp - 0x4c]
mov ebx, 0xc
mov esi, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x44]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0xc
je 0x40ab60
mov dword [esp], edi
mov eax, str.Error:_Invalid_format_n
mov dword [esp + 4], eax
call fcn.00403350
mov dword [ebp - 0x60], 0x32
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
test eax, eax
je 0x40a684
mov dword [esp], eax
call sub.msvcrt.dll_fclose
jmp 0x40a684
mov dword [esp], 2
mov eax, str.dump
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
mov ebx, eax
jne 0x40a67d
mov dword [esp], 3
mov esi, str.defines
mov dword [esp + 4], esi
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
jne 0x40ae10
lea esi, [edi + 8]
mov ecx, esi
call fcn.0044baa0
test eax, eax
je 0x40a67d
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x60], eax
mov dword [esp], ebx
mov ecx, dword [ebp - 0x5c]
call fcn.0044bb10
sub esp, 4
mov esi, eax
mov dword [esp], ebx
inc ebx
mov ecx, dword [ebp - 0x5c]
call fcn.0044bac0
mov ecx, str._ls_ls_n
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edi
call fcn.00402fc0
cmp dword [ebp - 0x60], ebx
jne 0x40a940
jmp 0x40a67d
movzx eax, word [str.Unknown_pragma]
lea edx, [ebp - 0x34]
mov ecx, 0x4adae0
mov esi, 0x1c
mov word [ebp - 0x36], ax
jmp 0x40a522
jne 0x40acc0
test ebx, ebx
mov esi, ecx
je 0x40a9d8
mov eax, dword [ebx + 0xc]
call fcn.00401d80
mov eax, ebx
mov ebx, dword [ebx + 8]
mov dword [esp], eax
mov edx, 0x14
mov dword [esp + 4], edx
call fcn.004a2230
test ebx, ebx
jne 0x40a9b4
mov ecx, esi
mov dword [edi + 0x8280], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi + 0x827c], ebx
mov dword [edi + 0x8284], ecx
mov dword [edi + 0x8288], esi
mov byte [edi + 0x8270], 2
jmp 0x40a78e
jne 0x40abb0
test ebx, ebx
mov esi, ecx
je 0x40aa30
mov eax, dword [ebx + 0xc]
call fcn.00401d80
mov eax, ebx
mov ebx, dword [ebx + 8]
mov dword [esp], eax
mov ecx, 0x14
mov dword [esp + 4], ecx
call fcn.004a2230
test ebx, ebx
jne 0x40aa0c
mov ecx, esi
mov dword [edi + 0x8280], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi + 0x827c], ebx
mov dword [edi + 0x8284], ecx
mov dword [edi + 0x8288], esi
mov byte [edi + 0x8270], 0
jmp 0x40a78e
jne 0x40ac30
test ebx, ebx
mov esi, ecx
je 0x40aa90
mov eax, dword [ebx + 0xc]
call fcn.00401d80
mov eax, ebx
mov ebx, dword [ebx + 8]
mov dword [esp], eax
mov edx, 0x14
mov dword [esp + 4], edx
call fcn.004a2230
test ebx, ebx
jne 0x40aa6c
mov ecx, esi
mov dword [edi + 0x8280], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi + 0x827c], ebx
mov dword [edi + 0x8284], ecx
mov dword [edi + 0x8288], esi
mov byte [edi + 0x8270], 3
jmp 0x40a78e
jne 0x40ac78
test ebx, ebx
mov esi, ecx
je 0x40a9d8
mov eax, dword [ebx + 0xc]
call fcn.00401d80
mov eax, ebx
mov ebx, dword [ebx + 8]
mov dword [esp], eax
mov edx, 0x14
mov dword [esp + 4], edx
call fcn.004a2230
test ebx, ebx
jne 0x40aad0
jmp 0x40a9d6
jne 0x40ad08
test ebx, ebx
mov esi, ecx
lea esi, [esi]
je 0x40ab36
mov eax, dword [ebx + 0xc]
call fcn.00401d80
mov eax, ebx
mov ebx, dword [ebx + 8]
mov dword [esp], eax
mov edx, 0x14
mov dword [esp + 4], edx
call fcn.004a2230
test ebx, ebx
jne 0x40ab12
mov ecx, esi
mov dword [edi + 0x8280], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi + 0x827c], ebx
mov dword [edi + 0x8284], ecx
mov dword [edi + 0x8288], esi
mov byte [edi + 0x8270], 1
jmp 0x40a78e
cmp dword [ebp - 0x44], 0x46535449
jne 0x40a8a1
mov eax, dword [ebp - 0x40]
or eax, 1
cmp eax, 3
jne 0x40a8a1
jmp 0x40a8b9
mov dword [esp], edi
mov ecx, str.Unknown_pragma
mov ebx, 0x17d4
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
call fcn.00407980
jmp 0x40a67d
mov byte [ebp - 0x42], 0
movzx eax, si
test ebx, ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x68], ecx
je 0x40ac10
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], esi
jmp 0x40abdb
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x40ade0
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x5c], edx
movzx edx, word [ebx + 0x10]
cmp edx, eax
jb 0x40abd0
mov dword [ebp - 0x68], ebx
mov ebx, esi
jmp 0x40abd3
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], esi
mov esi, dword [ebp - 0x68]
cmp esi, ecx
jne 0x40ad91
lea esi, [esi]
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
lea ecx, [edi + 0x8274]
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call fcn.0049f370
sub esp, 8
jmp 0x40a78e
mov byte [ebp - 0x42], 3
movzx eax, si
test ebx, ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x68], ecx
je 0x40ac10
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], esi
jmp 0x40ac5b
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x40adb0
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x5c], edx
movzx edx, word [ebx + 0x10]
cmp edx, eax
jb 0x40ac50
mov dword [ebp - 0x68], ebx
mov ebx, esi
jmp 0x40ac53
mov byte [ebp - 0x42], 2
movzx eax, si
test ebx, ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x68], ecx
je 0x40ac10
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], esi
jmp 0x40aca3
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x40abf8
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x5c], edx
movzx edx, word [ebx + 0x10]
cmp edx, eax
jb 0x40ac98
mov dword [ebp - 0x68], ebx
mov ebx, esi
jmp 0x40ac9b
mov byte [ebp - 0x42], 2
movzx eax, si
test ebx, ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x68], ecx
je 0x40ac10
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], esi
jmp 0x40aceb
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x40ad80
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x5c], edx
movzx edx, word [ebx + 0x10]
cmp edx, eax
jb 0x40ace0
mov dword [ebp - 0x68], ebx
mov ebx, esi
jmp 0x40ace3
mov byte [ebp - 0x42], 1
movzx eax, si
test ebx, ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x68], ecx
je 0x40ac10
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], esi
jmp 0x40ad37
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x40ad50
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x5c], edx
movzx edx, word [ebx + 0x10]
cmp edx, eax
jb 0x40ad30
mov dword [ebp - 0x68], ebx
mov ebx, esi
jmp 0x40ad33
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], esi
mov esi, dword [ebp - 0x68]
cmp esi, ecx
je 0x40ac10
movzx edx, word [esi + 0x10]
cmp eax, edx
jb 0x40ac10
mov eax, dword [ebp - 0x68]
mov byte [eax + 0x12], 1
jmp 0x40a78e
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], esi
mov esi, dword [ebp - 0x68]
cmp ecx, esi
je 0x40ac10
movzx edx, word [esi + 0x10]
cmp eax, edx
jb 0x40ac10
mov eax, dword [ebp - 0x68]
mov byte [eax + 0x12], 2
jmp 0x40a78e
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], esi
mov esi, dword [ebp - 0x68]
cmp esi, ecx
je 0x40ac10
movzx edx, word [esi + 0x10]
cmp eax, edx
jb 0x40ac10
mov eax, dword [ebp - 0x68]
mov byte [eax + 0x12], 3
jmp 0x40a78e
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], esi
mov esi, dword [ebp - 0x68]
cmp esi, ecx
je 0x40ac10
movzx edx, word [esi + 0x10]
cmp eax, edx
jb 0x40ac10
mov eax, dword [ebp - 0x68]
mov byte [eax + 0x12], 0
jmp 0x40a78e
mov dword [esp], 3
mov edx, str.macros
xor esi, esi
mov dword [esp + 4], edx
mov ecx, dword [ebp + 8]
call fcn.0041c780
sub esp, 8
test eax, eax
je 0x40ae56
jmp 0x40af2a
mov dword [esp + 8], eax
mov eax, 0x4ad9cc
inc esi
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00402fc0
mov dword [esp], esi
mov ecx, edi
call fcn.00444870
sub esp, 4
test eax, eax
jne 0x40ae40
jmp 0x40a67d
mov dword [esp], 0x20
call fcn.00450d80
mov dword [eax + 0xc], 0
mov ebx, eax
mov dword [eax + 0x10], 0
lea eax, [eax + 0xc]
mov dword [ebx + 0x14], eax
lea ecx, [ebx + 8]
mov dword [ebx + 0x18], eax
mov eax, dword [edi + 0x826c]
mov dword [ebx + 0x1c], 0
mov dword [ebx], eax
movzx eax, byte [edi + 0x8270]
mov byte [ebx + 4], al
lea eax, [edi + 0x8274]
mov dword [esp], eax
call fcn.00402130
mov eax, dword [edi + 0x826c]
mov dword [edi + 0x826c], ebx
mov dword [ebx], eax
sub esp, 4
jmp 0x40a600
mov dword [esp], edi
lea eax, [ebp - 0x36]
mov dword [esp + 8], eax
mov eax, 0x17d4
mov dword [esp + 4], eax
call fcn.00407980
jmp 0x40a67d
lea ecx, [edi + 0x826c]
call fcn.00402f40
test al, al
jne 0x40a600
mov dword [esp], edi
mov eax, str.Unexpected
mov dword [esp + 8], eax
mov eax, 0x17d5
mov dword [esp + 4], eax
call fcn.00407980
jmp 0x40a67d
cmp byte [edi + 0x21], 0
je 0x40af48
cmp byte [edi + 0x23], 0
mov ebx, 1
je 0x40af48
cmp byte [edi + 0x24], 0
je 0x40af62
movzx ebx, byte [edi + 0x22]
add ebx, 3
mov dword [esp + 8], ebx
mov eax, str.V_d_n
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00402fc0
jmp 0x40a67d
mov ebx, 2
jmp 0x40af48
mov dword [esp], 2
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
call fcn.0041c3e0
push edx
mov ebx, eax
push edx
mov dword [esp + 8], str.NSIS__it_really_installs_llamas_without_safety_glass_
mov dword [esp + 4], 0x4adac2
mov dword [esp], edi
call fcn.00402fc0
mov eax, 1
cmp dword [ebp - 0x44], 0
cmove ebx, eax
mov dword [esp], ebx
call sub.msvcrt.dll_exit
mov ebx, eax
jmp 0x4a32ce