Function at 0x40540a
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x68c
mov eax, dword [0x42e0b4]
xor eax, esp
mov dword [esp + 0x688], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov esi, 0x104
mov dword [esp + 0x18], eax
xor ebx, ebx
mov dword [esp + 0x28], edx
push esi
lea eax, [esp + 0x25c]
mov dword [esp + 0x30], ebx
push ebx
push eax
mov edi, ecx
mov dword [esp + 0x46c], ebx
mov byte [esp + 0x470], 1
mov dword [esp + 0x474], esi
call fcn.00417fbd
add esp, 0xc
mov dword [esp + 0x248], ebx
lea eax, [esp + 0x40]
mov byte [esp + 0x24c], 1
mov dword [esp + 0x250], esi
push esi
push ebx
push eax
call fcn.00417fbd
xor eax, eax
lea ecx, [esp + 0x264]
add esp, 0xc
mov ebx, 0x7ee3
cmp byte [esp + 0x464], al
sete al
dec eax
and eax, ebx
add eax, esi
push eax
call fcn.0040e3f0
test eax, eax
js 0x4196b3
xor eax, eax
lea ecx, [esp + 0x40]
cmp byte [esp + 0x24c], al
sete al
dec eax
and eax, ebx
add eax, esi
push eax
call fcn.0040e3f0
test eax, eax
js 0x4196b3
mov ecx, edi
call fcn.00405929
push 0x2a
mov ebx, eax
mov esi, edi
pop eax
push 0x3f
mov word [esp + 0x690], ax
pop eax
mov word [esp + 0x68e], ax
lea ecx, [esi + 2]
xor eax, eax
push 2
mov word [esp + 0x694], ax
pop edx
mov ax, word [esi]
add esi, edx
cmp ax, word [esp + 0x2c]
jne 0x40550d
sub esi, ecx
lea edx, [esp + 0x68c]
mov ecx, edi
sar esi, 1
call fcn.00409eba
cmp eax, esi
sbb esi, esi
neg esi
mov dword [esp + 0x34], esi
cmp ebx, 0xffffffff
je 0x41966f
cmp ebx, 1
jg 0x419726
cmp dword [ebp + 0x10], 0
jne 0x4058f0
push 2
pop ebx
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], 1
push 0x20
pop eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], eax
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, edi
push dword [ecx + 0x18]
xor ecx, ecx
push ecx
push eax
mov ecx, fcn.004159d0
call fcn.0041589a
test al, al
je 0x419749
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x258]
push edi
call fcn.0040a641
mov ecx, dword [esp + 0x460]
test ecx, ecx
je 0x419795
push 0x5c
pop edx
call fcn.004101f5
lea esi, [ebx + eax]
mov dword [esp + 0x3c], esi
cmp dword [0x43259c], 0
jne 0x4199a8
mov ecx, dword [esp + 0x460]
test ecx, ecx
je 0x4197a1
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x468]
mov eax, dword [edi + 0x18]
add eax, 0x2c
push eax
mov eax, esi
sub eax, ecx
mov ecx, esi
sar eax, 1
sub edx, eax
call fcn.0040f3a0
push dword [esp + 0x28]
lea ecx, [esp + 0x44]
call fcn.0040a641
cmp byte [esp + 0x12], 1
je 0x40587b
xor eax, eax
mov byte [esp + 0x67c], 1
mov esi, 0x104
mov dword [esp + 0x678], eax
push esi
push eax
lea eax, [esp + 0x478]
mov dword [esp + 0x688], esi
push eax
call fcn.00417fbd
xor eax, eax
lea ecx, [esp + 0x47c]
add esp, 0xc
cmp byte [esp + 0x67c], al
sete al
dec eax
and eax, 0x7ee3
add eax, esi
push eax
call fcn.0040e3f0
test eax, eax
js 0x4197bf
mov ecx, dword [esp + 0x678]
test ecx, ecx
je 0x4197eb
mov eax, dword [esp + 0x248]
test eax, eax
je 0x4197f7
xor esi, esi
push esi
push ecx
push dword [esp + 0x258]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
test eax, eax
je 0x41989c
cmp eax, 0x7fe7
jae 0x41989c
mov ecx, dword [esp + 0x678]
mov edi, ecx
test ecx, ecx
je 0x419800
lea edx, [edi + 2]
mov ax, word [edi]
add edi, ebx
cmp ax, si
jne 0x4056c1
sub edi, edx
sar edi, 1
test ecx, ecx
je 0x41980c
mov eax, dword [esp + 0x460]
test eax, eax
je 0x419818
push esi
push ecx
push dword [esp + 0x470]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
test eax, eax
je 0x41989c
cmp eax, 0x7fe7
jae 0x41989c
mov ecx, dword [esp + 0x678]
test ecx, ecx
je 0x419824
mov edx, dword [esp + 0x680]
lea eax, [esp + 0x20]
push eax
call fcn.0040532e
test eax, eax
je 0x419830
mov edx, dword [esp + 0x678]
mov ecx, edx
test edx, edx
je 0x419874
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, ebx
cmp ax, word [esp + 0x2c]
jne 0x405745
sub ecx, esi
xor eax, eax
mov esi, dword [esp + 0x20]
sar ecx, 1
sub esi, ecx
mov dword [esp + 0x678], eax
mov dword [esp + 0x20], esi
test edx, edx
je 0x405774
push edx
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
lea eax, [esi + edi]
cmp eax, 0x7fe7
ja 0x419880
mov edx, dword [esp + 0x248]
test edx, edx
je 0x419887
mov ecx, dword [esp + 0x460]
test ecx, ecx
je 0x419890
lea eax, [esp + 0x30]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004053cb
test eax, eax
je 0x4198b6
cmp dword [esp + 0x30], 0
je 0x4057cc
inc dword [esp + 0x24]
cmp dword [esp + 0x34], 0
jne 0x4058fd
cmp byte [esp + 0x13], 0
je 0x41984a
mov ecx, dword [esp + 0x1c]
call fcn.00408b4d
call fcn.00406468
mov ecx, dword [esp + 0x18]
mov esi, 0x448e30
mov eax, dword [ecx + 0x18]
mov ebx, dword [eax]
mov eax, dword [esp + 0x24]
push eax
push 0x401f94
push 0x104
push esi
call fcn.00409abf
and bl, 0x10
movzx eax, bl
neg eax
push esi
sbb eax, eax
add eax, 0x236e
push 1
push eax
call fcn.004063bd
mov eax, dword [esp + 0x264]
xor ebx, ebx
add esp, 0x1c
cmp dword [esp + 0x14], ebx
setne bl
xor esi, esi
mov dword [esp + 0x248], esi
test eax, eax
je 0x405848
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov eax, dword [esp + 0x460]
mov dword [esp + 0x460], esi
test eax, eax
je 0x405862
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov eax, ebx
mov ecx, dword [esp + 0x694]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416b30
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0x248]
test ecx, ecx
je 0x4197ad
push 0x5c
pop edx
call fcn.004101f5
mov ecx, dword [esp + 0x248]
lea esi, [ebx + eax]
test ecx, ecx
je 0x4197b6
mov eax, dword [edi + 0x18]
mov edx, dword [esp + 0x250]
add eax, 0x2c
push eax
mov eax, esi
sub eax, ecx
mov ecx, esi
sar eax, 1
sub edx, eax
call fcn.0040f3a0
mov ecx, dword [esp + 0x248]
test ecx, ecx
je 0x40591a
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, ebx
cmp ax, si
jne 0x4058d1
sub ecx, edx
sar ecx, 1
cmp ecx, 0x7fe7
jbe 0x405612
jmp 0x419990
push 2
mov byte [esp + 0x16], 1
pop ebx
jmp 0x405558
mov eax, dword [esp + 0x460]
test eax, eax
je 0x405920
push eax
push 0x402280
call fcn.00409950
pop ecx
pop ecx
jmp 0x4057cc
lea ecx, [esp + 0x40]
jmp 0x4058cc
lea eax, [esp + 0x258]
jmp 0x405908
mov ah, 0x5f
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc ebp
or byte [edi], cl
mov bh, 0x48
push es
dec edx
xor byte [ebx - 0x74ee76f0], cl
push eax
add al, 0x89
push ecx
add al, 0x8b
push eax
or byte [ecx + 0x408b0851], cl
or al, 0x89
inc ecx
or al, 0xeb
dec edi
mov ebp, esp
push ecx
mov dword [ebp - 4], 0
jmp 0x4197b6
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 0x34]
dec ebp
or byte [ebx + 0x513bfc55], cl
xor al, 0x73
and al, 0x8b
inc ebp
cld
jae 0x4197e5
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x30]
mov eax, dword [edx + eax]
cmp eax, dword [ebp + 0xc]
jne 0x4197e3
mov eax, dword [ebp - 4]
shl eax, 4
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x30]
jmp 0x4197e7
jmp 0x4197ad
xor eax, eax
mov esp, ebp
pop ebp
ret
int3
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004197a0
add esp, 8
mov dword [ebp - 4], eax
inc dword [ebx + 0x458908c4]
cld
cmp dword [ebp - 4], 0
je 0x419815
or byte [ebx + 0x428bfc55], cl
add al, 0xeb
add eax, dword [ebx - 0x1a740038]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
jmp 0x419818
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
in al, dx
and byte [ebx - 0x7666f3bb], cl
inc ebp
loopne 0x4197b7
push ebp
in al, 0x8b
inc ebp
adc byte [ebx], dh
leave
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea edx, [ebp - 0x10]
xor eax, eax
push eax
push edx
mov ecx, dword [ebp + 0x14]
xor edx, edx
push edx
push ecx
lea eax, [ebp - 0x18]
xor ecx, ecx
push ecx
push eax
lea edx, [ebp - 0x20]
xor eax, eax
push eax
push edx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xd2654135
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041aa30
add esp, 0x30
mov dword [ebp - 8], eax
push ebp
invalid
adc dword [eax], eax
add byte [ebx + 0x458930c4], al
clc
mov dword [ebp - 4], edx
mov edx, dword [ebp - 8]
or edx, dword [ebp - 4]
jne 0x419894
or al, 0x8b
inc ebp
invalid
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov al, 1
jmp 0x419896
xor al, al
mov esp, ebp
pop ebp
ret
int3
ror byte [ecx + 0x4589e855], 0xec
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea ecx, [ebp - 0x10]
xor edx, edx
push edx
push ecx
mov eax, dword [ebp + 0x18]
xor ecx, ecx
push ecx
push eax
lea edx, [ebp - 0x18]
xor eax, eax
push eax
push edx
lea ecx, [ebp - 0x20]
xor edx, edx
push edx
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xd2654135
mov eax, dword [ebp + 8]
push eax
call fcn.0041aa30
add esp, 0x30
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 8]
or ecx, dword [ebp - 4]
jne 0x419916
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x1c]
mov dword [eax], edx
mov al, 1
jmp 0x419918
xor al, al
mov esp, ebp
pop ebp
ret
inc ebp
and byte [ecx - 0x14fe4ff0], cl
add dh, byte [edx]
ror byte [ebx - 0x333ca21b], 0xcc
or byte [edi], cl
mov dh, 8