Function at 0x405590
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x21b0
call fcn.0041ef00
lea ecx, [ebp - 0x24]
call fcn.00401290
mov ecx, dword [ebp + 0xc]
movzx eax, word [ecx]
test ax, ax
je 0x4055c6
mov edx, eax
cmp dx, 0x20
ja 0x4055c6
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4055b2
push ebx
push esi
push edi
lea eax, [ebp - 0x24]
push eax
push ecx
call fcn.004046e0
add esp, 8
lea ecx, [ebp - 0x10]
mov ebx, eax
mov dword [ebp - 0x14], ebx
call fcn.004021f0
lea ecx, [ebp - 8]
call fcn.004021f0
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.004112f0
test al, al
je 0x405c04
push 1
lea ecx, [ebp - 0x24]
call fcn.004012e0
push eax
lea ecx, [ebp - 8]
call fcn.00411270
test al, al
je 0x405c04
lea eax, [ebp - 4]
push eax
push 0x40
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x10]
call fcn.004113d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0x40
jne 0x405c04
mov eax, 0x5a4d
cmp word [ebp - 0xb0], ax
jne 0x405c04
lea eax, [ebp - 4]
push eax
push 0x40
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0x40
jne 0x405c04
mov esi, dword [ebp - 0x74]
cmp esi, 0x40
jb 0x405c04
mov edi, 0x40
jle 0x4056f6
mov eax, 0x2000
sub esi, edi
lea ecx, [ebp - 0x10]
cmp esi, 0x2000
cmova esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x21b0]
push eax
call fcn.004113d0
test al, al
je 0x405c04
cmp dword [ebp - 4], esi
jne 0x405c04
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x405c04
mov esi, dword [ebp - 0x74]
add edi, eax
mov eax, 0x2000
cmp edi, esi
jl 0x405691
push 0x422518
push ebx
call fcn.00405ea0
mov esi, eax
add esp, 8
test esi, esi
je 0x4057e8
nop
lea ecx, [ebp - 0x30]
call fcn.00401290
movzx eax, word [esi]
test ax, ax
je 0x405736
mov ecx, eax
cmp cx, 0x20
ja 0x405736
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x405722
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.004046e0
add esp, 8
mov dword [ebp - 0x14], eax
lea ecx, [ebp + 0xc]
mov ebx, eax
call fcn.004021f0
lea ecx, [ebp - 0x30]
call fcn.004012e0
push eax
lea ecx, [ebp + 0xc]
call fcn.004112f0
test al, al
je 0x405bf4
nop dword [eax]
lea eax, [ebp - 0xc]
push eax
push 0x2000
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp + 0xc]
call fcn.004113d0
test al, al
je 0x405bf4
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405bf4
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x405bf4
add edi, eax
test eax, eax
jne 0x405770
lea ecx, [ebp + 0xc]
call fcn.00402320
lea ecx, [ebp - 0x30]
call fcn.00401650
push 0x422518
push ebx
call fcn.00405ea0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405710
lea eax, [ebp - 4]
push eax
push 0xf8
lea eax, [ebp - 0x1b0]
push eax
lea ecx, [ebp - 0x10]
call fcn.004113d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0xf8
jne 0x405c04
cmp dword [ebp - 0x1b0], 0x4550
jne 0x405c04
mov eax, 0xe0
cmp word [ebp - 0x19c], ax
jne 0x405c04
mov esi, dword [ebp - 0x174]
mov ecx, edi
mov edx, dword [ebp - 0x74]
sub ecx, edx
lea eax, [esi - 1]
and ecx, eax
je 0x40588b
sub esi, ecx
lea eax, [ebp - 0x21b0]
push esi
push 0
push eax
call fcn.0041c590
add esp, 0xc
lea eax, [ebp - 4]
lea ecx, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x21b0]
push eax
call fcn.004115d0
test al, al
je 0x405c04
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x405c04
mov edx, dword [ebp - 0x74]
add edi, eax
mov eax, dword [ebp - 0x15c]
mov esi, edi
sub esi, edx
add eax, esi
mov dword [ebp - 0x15c], eax
cmp eax, dword [ebp - 0x178]
ja 0x405c04
lea eax, [ebp - 4]
mov dword [ebp - 0x158], 0
push eax
push 0xf8
lea eax, [ebp - 0x1b0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0xf8
jne 0x405c04
xor eax, eax
xor ebx, ebx
cmp ax, word [ebp - 0x1aa]
jae 0x405970
lea eax, [ebp - 4]
push eax
push 0x28
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x10]
call fcn.004113d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0x28
jne 0x405c04
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x405921
add eax, esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40592d
add eax, esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x405939
add eax, esi
mov dword [ebp - 0x54], eax
lea eax, [ebp - 4]
push eax
push 0x28
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0x28
jne 0x405c04
movzx eax, word [ebp - 0x1aa]
inc ebx
cmp ebx, eax
jl 0x4058f1
nop dword [eax]
lea eax, [ebp - 0xc]
push eax
push 0x2000
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 0x10]
call fcn.004113d0
test al, al
je 0x405c04
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x405c04
test eax, eax
jne 0x405970
cmp dword [ebp - 0x74], edi
je 0x4059fd
lea ecx, [ebp - 8]
mov dword [ebp - 0x74], edi
call fcn.004114d0
test al, al
je 0x405c04
lea eax, [ebp - 4]
push eax
push 0x40
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c04
cmp dword [ebp - 4], 0x40
jne 0x405c04
lea ecx, [ebp - 8]
call fcn.00411200
test al, al
je 0x405c04
mov ebx, dword [ebp - 0x14]
push str.sfxmanifest
push ebx
call fcn.00405ea0
mov esi, eax
add esp, 8
test esi, esi
je 0x405b0e
lea ecx, [ebp - 0x3c]
call fcn.00401290
movzx eax, word [esi]
test ax, ax
je 0x405a54
mov ecx, eax
nop word [eax + eax]
cmp cx, 0x20
ja 0x405a54
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x405a40
lea eax, [ebp - 0x3c]
push eax
push esi
call fcn.004046e0
add esp, 8
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.004021f0
lea ecx, [ebp - 0x3c]
call fcn.004012e0
push eax
lea ecx, [ebp - 0x14]
call fcn.004112f0
test al, al
je 0x405c27
lea eax, [ebp - 4]
push eax
push 0x2000
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 0x14]
call fcn.004113d0
test al, al
je 0x405c27
cmp dword [ebp - 4], 0x2000
je 0x405c27
push 0
lea ecx, [ebp - 0x24]
call fcn.004012e0
push eax
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov esi, eax
test esi, esi
je 0x405c27
push dword [ebp - 4]
lea eax, [ebp - 0x21b0]
push eax
push 0
push 1
push 0x18
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push 0
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
test eax, eax
je 0x405c27
test edi, edi
je 0x405c27
lea ecx, [ebp - 0x14]
call fcn.00402320
lea ecx, [ebp - 0x3c]
call fcn.00401650
push 3
lea ecx, [ebp - 0x24]
call fcn.004012e0
push eax
lea ecx, [ebp - 8]
call fcn.00411330
test al, al
je 0x405c04
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 8]
call fcn.004114f0
test al, al
je 0x405c04
cmp word [ebx], 0
je 0x405bf0
nop word [eax + eax]
lea ecx, [ebp - 0x48]
call fcn.00401290
lea eax, [ebp - 0x48]
push eax
push ebx
call fcn.004046e0
add esp, 8
lea ecx, [ebp - 0xc]
mov ebx, eax
call fcn.004021f0
lea ecx, [ebp - 0x48]
call fcn.004012e0
push eax
lea ecx, [ebp - 0xc]
call fcn.004112f0
test al, al
je 0x405c34
nop dword [eax + eax]
lea eax, [ebp - 0x18]
push eax
push 0x2000
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 0xc]
call fcn.004113d0
test al, al
je 0x405c34
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x21b0]
push eax
lea ecx, [ebp - 8]
call fcn.004115d0
test al, al
je 0x405c34
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x18]
jne 0x405c34
test eax, eax
jne 0x405b90
lea ecx, [ebp - 0xc]
call fcn.00402320
lea ecx, [ebp - 0x48]
call fcn.00401650
cmp word [ebx], 0
jne 0x405b50
mov bl, 1
jmp 0x405c06
lea ecx, [ebp + 0xc]
call fcn.00402320
lea ecx, [ebp - 0x30]
call fcn.00401650
xor bl, bl
lea ecx, [ebp - 8]
call fcn.00402320
lea ecx, [ebp - 0x10]
call fcn.00402320
lea ecx, [ebp - 0x24]
call fcn.00401650
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x14]
call fcn.00402320
lea ecx, [ebp - 0x3c]
jmp 0x405bff
lea ecx, [ebp - 0xc]
call fcn.00402320
lea ecx, [ebp - 0x48]
jmp 0x405bff