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

Disassembly:
sub esp, 0x4f4
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
call fcn.00432e06
xor ecx, ecx
cmp al, 2
sete cl
xor ebx, ebx
push ebx
push 1
lea edx, [esp + 0x1f]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x20]
call fcn.004139fa
test al, al
je 0x4102fb
mov al, byte [esp + 0x17]
test al, al
je 0x4102fb
mov ecx, dword [esp + 0x18]
movzx eax, al
push ebx
push eax
lea edx, [esp + 0x288]
call fcn.004139fa
test al, al
je 0x4102fb
movzx eax, byte [esp + 0x17]
jmp 0x4100b2
dec eax
cmp byte [esp + eax + 0x280], bl
je 0x4100f6
test eax, eax
jne 0x4100a8
mov ecx, ebx
push 5
pop eax
push ebx
test ecx, ecx
mov esi, 0xff05
cmove eax, esi
push 2
movzx eax, ax
pop edi
mov dword [esp + 0x28], eax
push edi
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x24]
call dword [0xfe801474]
cmp eax, edi
jne 0x4102fb
cmp word [esp + 0x24], si
jne 0x410101
mov al, 1
jmp 0x4102fd
lea ecx, [esp + 0x280]
add ecx, eax
jmp 0x4100b8
xor ecx, ecx
push ecx
mov ecx, dword [esp + 0x1c]
push 4
pop eax
push eax
lea edx, [esp + 0x4c]
mov byte [esp + 0x28], bl
call fcn.004139fa
test al, al
je 0x4102fb
cmp byte [esp + 0x44], 5
jne 0x4102fb
test byte [esp + 0x30], 1
push 0x17
pop ebp
je 0x410140
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], edi
jmp 0x410148
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ebp
movzx eax, byte [esp + 0x47]
mov edi, dword [0xfe801268]
xor ecx, ecx
mov esi, ecx
push 0x10
mov dword [esp + 0x40], esi
pop edx
dec eax
je 0x410290
dec eax
dec eax
je 0x4101bb
dec eax
jne 0x4102fb
push ecx
mov ecx, dword [esp + 0x1c]
push edx
lea edx, [esp + 0xf0]
call fcn.004139fa
test al, al
je 0x4102fb
push 0x20
push 8
push dword [0xfe840f0c]
call edi
mov esi, eax
mov dword [esp + 0x3c], esi
test esi, esi
je 0x4102ba
push 0x10
pop eax
push eax
lea eax, [esp + 0xec]
push eax
mov word [esi], bp
lea eax, [esi + 8]
jmp 0x4102d2
push ecx
mov ecx, dword [esp + 0x1c]
push 1
lea edx, [esp + 0x1f]
call fcn.004139fa
test al, al
je 0x4102fb
mov al, byte [esp + 0x17]
test al, al
je 0x4102fb
xor ecx, ecx
movzx eax, al
push ecx
mov ecx, dword [esp + 0x1c]
push eax
lea edx, [esp + 0x408]
call fcn.004139fa
test al, al
je 0x4102fb
movzx eax, byte [esp + 0x17]
xor ecx, ecx
mov byte [esp + eax + 0x400], cl
lea eax, [esp + 0x4c]
push eax
push ecx
push ecx
lea eax, [esp + 0x40c]
push eax
mov dword [esp + 0x5c], ecx
call dword [0xfe8014bc]
test eax, eax
je 0x410230
mov bl, 4
jmp 0x4102bc
xor ecx, ecx
mov dl, cl
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x41024f
movzx eax, dl
mov eax, dword [esp + eax*4 + 0x50]
cmp dword [ecx + 4], eax
je 0x410268
mov ecx, dword [ecx + 0x1c]
test ecx, ecx
jne 0x410243
inc dl
cmp dl, 2
jb 0x410234
mov bl, 4
mov byte [esp + 0x20], bl
push dword [esp + 0x4c]
call dword [0xfe8014d0]
jmp 0x4102dc
mov edx, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x18]
call fcn.0042b3de
mov esi, eax
mov dword [esp + 0x3c], esi
test esi, esi
jne 0x410281
mov bl, 1
jmp 0x410258
cmp word [esi], bp
jne 0x41025c
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 4], eax
jmp 0x41025c
push ecx
mov ecx, dword [esp + 0x1c]
push 4
lea edx, [esp + 0x6c]
call fcn.004139fa
test al, al
je 0x4102fb
push 0x14
push 8
push dword [0xfe840f0c]
call edi
mov esi, eax
mov dword [esp + 0x3c], esi
test esi, esi
jne 0x4102c2
mov bl, 1
mov byte [esp + 0x20], bl
jmp 0x4102dc
push 2
pop eax
mov word [esi], ax
lea eax, [esp + 0x64]
push 4
push eax
lea eax, [esi + 4]
push eax
call dword [0xfe8014f4]
add esp, 0xc
mov ecx, dword [esp + 0x18]
xor eax, eax
push eax
push 2
pop eax
push eax
lea edx, [esp + 0x50]
call fcn.004139fa
test al, al
jne 0x410308
mov ecx, esi
call fcn.0042b3a3
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f4
ret
mov bh, 1
test bl, bl
jne 0x4109e5
mov ax, word [esp + 0x48]
mov word [esi + 2], ax
movzx eax, byte [esp + 0x45]
dec eax
je 0x41098c
dec eax
je 0x4108c5
dec eax
je 0x410339
add bl, 7
jmp 0x41099c
mov eax, 0x80
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x20]
call dword [0xfe8014c4]
test eax, eax
jne 0x4108be
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x384]
push eax
push dword [esp + 0x20]
call dword [0xfe8014d4]
test eax, eax
jne 0x4108be
mov word [esp + 0x6a], ax
cmp word [esp + 0x68], bp
jne 0x410398
mov dword [esp + 0x80], eax
mov dword [esp + 0x6c], eax
lea ecx, [esp + 0x68]
call fcn.00413d8e
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, 0xffffffff
je 0x4108be
push 0x10003
push 8
push dword [0xfe840f0c]
call edi
mov edi, eax
test edi, edi
jne 0x4103d0
mov bl, 1
mov byte [esp + 0x20], bl
jmp 0x4108b7
push dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
xor eax, eax
push eax
mov edx, ebp
call fcn.0040ff02
cmp eax, 1
jne 0x41089f
or dword [esp + 0x2c], 0xffffffff
or dword [esp + 0x104], 0xffffffff
push 2
xor ecx, ecx
pop eax
push ecx
mov dword [esp + 0xfc], eax
mov eax, dword [esp + 0x1c]
push ecx
mov dword [esp + 0x104], eax
push ecx
lea eax, [esp + 0x104]
push eax
push ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x114], ebp
call dword [0xfe8014c0]
test eax, eax
jle 0x410894
push 0x17
pop esi
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0xf8]
call fcn.004139dc
test al, al
je 0x41046b
xor eax, eax
push eax
push 0xffff
push edi
push ecx
call dword [0xfe8014cc]
test eax, eax
jle 0x410890
lea edx, [esp + 0xf8]
mov ecx, ebp
mov dword [esp + 0x28], 0x80
call fcn.004139dc
test al, al
je 0x410757
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x6c]
push eax
xor eax, eax
push eax
push 0xffff
push edi
push ebp
call dword [0xfe8014b8]
mov ebp, eax
mov dword [esp + 0x58], ebp
test ebp, ebp
jle 0x41088c
cmp ebp, 6
jb 0x410753
mov cx, word [esp + 0x68]
cmp word [esp + 0x380], cx
jne 0x410753
push 2
pop eax
cmp cx, ax
jne 0x4104e2
mov eax, dword [esp + 0x384]
cmp eax, dword [esp + 0x6c]
jmp 0x410503
cmp cx, si
jne 0x410509
push 0x10
pop eax
push eax
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x390]
push eax
call dword [0xfe8014fc]
add esp, 0xc
test eax, eax
jne 0x410753
cmp byte [edi + 2], 0
jne 0x410753
xor eax, eax
cmp word [edi], ax
jne 0x410753
cmp dword [esp + 0x24], eax
jne 0x410562
push dword [esp + 0x28]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x208]
push eax
call dword [0xfe8014f4]
add esp, 0xc
cmp word [esp + 0x200], si
jne 0x410558
xor eax, eax
mov dword [esp + 0x218], eax
mov dword [esp + 0x204], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
xor eax, eax
push 0x80
push eax
lea eax, [esp + 0x70]
push eax
call dword [0xfe8014f8]
movzx eax, byte [edi + 3]
add esp, 0xc
dec eax
je 0x410682
push 2
pop ecx
sub eax, ecx
je 0x4105c2
dec eax
jne 0x410753
cmp ebp, 0x16
jle 0x410753
push 0x10
pop eax
push eax
lea eax, [edi + 4]
push eax
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x34], 0x1c
mov word [esp + 0x74], si
call dword [0xfe8014f4]
add esp, 0xc
push 0x14
jmp 0x4106b2
mov al, byte [edi + 4]
test al, al
je 0x410753
movzx ebp, al
lea eax, [ebp + 7]
cmp dword [esp + 0x58], eax
jle 0x410753
push ebp
lea eax, [edi + 5]
push eax
lea eax, [esp + 0x288]
push eax
call dword [0xfe8014f4]
add esp, 0xc
xor ecx, ecx
lea eax, [esp + 0x40]
push eax
push ecx
push ecx
lea eax, [esp + 0x28c]
mov byte [esp + ebp + 0x28c], cl
push eax
add ebp, 5
mov dword [esp + 0x50], ecx
call dword [0xfe8014bc]
test eax, eax
jne 0x410753
mov dl, al
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x41063d
movzx eax, dl
mov eax, dword [esp + eax*4 + 0x50]
cmp dword [ecx + 4], eax
je 0x410649
mov ecx, dword [ecx + 0x1c]
test ecx, ecx
jne 0x410631
inc dl
cmp dl, 2
jb 0x410622
jmp 0x410753
mov eax, dword [ecx + 0x10]
push eax
mov dword [esp + 0x2c], eax
push dword [ecx + 0x18]
lea eax, [esp + 0x70]
push eax
call dword [0xfe8014f4]
add esp, 0xc
cmp word [esp + 0x68], si
jne 0x410676
xor eax, eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x6c], eax
push dword [esp + 0x40]
call dword [0xfe8014d0]
jmp 0x4106b3
cmp ebp, 0xa
jle 0x410753
push 0x10
pop eax
push 2
mov dword [esp + 0x2c], eax
pop eax
push 4
mov word [esp + 0x6c], ax
pop eax
push eax
lea eax, [edi + 4]
push eax
lea eax, [esp + 0x74]
push eax
call dword [0xfe8014f4]
add esp, 0xc
push 8
pop ebp
mov ax, word [edi + ebp]
mov edx, dword [esp + 0x2c]
push 2
mov word [esp + 0x6e], ax
pop eax
add ebp, eax
cmp edx, 0xffffffff
jne 0x410726
xor eax, eax
push 0x80
push eax
lea eax, [esp + 0x288]
push eax
call dword [0xfe8014f8]
mov ax, word [esp + 0x74]
mov word [esp + 0x28c], ax
movzx eax, ax
add esp, 0xc
lea ecx, [esp + 0x280]
mov dword [esp + 0x34], eax
call fcn.00413d8e
mov edx, eax
mov dword [esp + 0x2c], edx
cmp edx, 0xffffffff
je 0x41088c
cmp dword [esp + 0x34], esi
push 4
pop eax
push 0x10
pop ecx
cmove eax, ecx
add eax, 6
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x58]
cmp ecx, ebp
jle 0x410753
movzx eax, word [esp + 0x68]
cmp dword [esp + 0x34], eax
jne 0x410753
push dword [esp + 0x28]
lea eax, [esp + 0x6c]
push eax
xor eax, eax
push eax
sub ecx, ebp
push ecx
lea eax, [edi + ebp]
push eax
push edx
call dword [0xfe8014c8]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x41083d
lea edx, [esp + 0xf8]
mov ecx, eax
call fcn.004139dc
test al, al
je 0x41083d
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x6c]
push eax
xor eax, eax
push eax
mov eax, 0xffff
sub eax, ecx
push eax
lea eax, [edi + ecx]
push eax
push dword [esp + 0x40]
call dword [0xfe8014b8]
mov ebp, eax
test ebp, ebp
jg 0x4107b6
movzx ecx, word [esp + 0x68]
cmp dword [esp + 0x34], ecx
jne 0x410839
xor eax, eax
mov word [edi], ax
mov byte [edi + 2], al
inc eax
cmp word [esp + 0x68], si
push 4
pop edx
cmove eax, edx
mov byte [edi + 3], al
mov eax, dword [esp + 0x34]
cmp eax, esi
jne 0x4107df
push 0x10
pop eax
push eax
lea eax, [esp + 0x74]
jmp 0x4107eb
push 2
pop ecx
cmp eax, ecx
jne 0x410839
push edx
lea eax, [esp + 0x70]
push eax
lea eax, [edi + 4]
push eax
call dword [0xfe8014f4]
add esp, 0xc
push 2
pop eax
push eax
lea eax, [esp + 0x6e]
push eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffffe
add eax, edi
push eax
call dword [0xfe8014f4]
add esp, 0xc
lea eax, [esp + 0x200]
push dword [esp + 0x24]
push eax
xor eax, eax
push eax
mov eax, dword [esp + 0x44]
add eax, ebp
mov ebp, dword [esp + 0x28]
push eax
push edi
push ebp
call dword [0xfe8014c8]
jmp 0x41083d
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, 0xffffffff
setne al
push 2
pop edx
mov dword [esp + 0x104], ecx
xor ecx, ecx
push ecx
push ecx
add eax, edx
mov dword [esp + 0x100], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x104], eax
push ecx
lea eax, [esp + 0x104]
push eax
push ecx
mov dword [esp + 0x114], ebp
call dword [0xfe8014c0]
test eax, eax
jg 0x41043f
jmp 0x410890
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
call fcn.00413d74
jmp 0x4108b0
cmp eax, 0xffffffff
jne 0x4108ac
mov bl, 1
mov byte [esp + 0x20], bl
jmp 0x4108b0
xor eax, eax
mov bh, al
mov ecx, edi
call fcn.0042b3a3
mov ecx, ebp
jmp 0x4109e0
mov bl, 1
jmp 0x41099c
xor eax, eax
mov word [esi + 2], ax
cmp word [esi], bp
jne 0x4108e6
push 0x10
pop eax
push eax
xor eax, eax
push eax
lea eax, [esi + 8]
push eax
call dword [0xfe8014f8]
add esp, 0xc
jmp 0x4108eb
xor eax, eax
mov dword [esi + 4], eax
mov ecx, esi
call fcn.00413b96
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x41099a
push dword [esp + 0x30]
xor ecx, ecx
push ecx
mov ecx, dword [esp + 0x20]
mov edx, eax
call fcn.0040ff02
mov edi, eax
cmp edi, 1
jne 0x41096f
push ecx
lea eax, [esp + 0x1c]
push eax
sub esp, 0xc
lea ecx, [esp + 0x38]
call fcn.00413d49
mov ecx, dword [esp + 0x24]
mov ebp, eax
call fcn.00413d74
cmp ebp, 0xffffffff
je 0x4108be
mov ecx, ebp
call fcn.004334e7
mov eax, dword [esp + 0x30]
push 2
pop ecx
or eax, ecx
mov ecx, dword [esp + 0x18]
push eax
xor eax, eax
push eax
mov edx, ebp
call fcn.0040ff02
mov edi, eax
cmp edi, 1
jne 0x41096b
mov ecx, dword [esp + 0x18]
mov edx, ebp
call fcn.00413bf4
mov ecx, ebp
jmp 0x410973
mov ecx, dword [esp + 0x24]
call fcn.00413d74
cmp edi, 0xffffffff
je 0x4108be
cmp edi, 1
je 0x4109e5
xor eax, eax
mov bh, al
jmp 0x4109e5
mov ecx, esi
call fcn.00413aab
mov edi, eax
cmp edi, 0xffffffff
jne 0x4109a2
mov bl, 5
mov byte [esp + 0x20], bl
jmp 0x4109e5
mov ecx, edi
call fcn.004334e7
mov ecx, dword [esp + 0x18]
push dword [esp + 0x30]
xor eax, eax
push eax
mov edx, edi
call fcn.0040ff02
cmp eax, 1
jne 0x4109cd
mov ecx, dword [esp + 0x18]
mov edx, edi
call fcn.00413bf4
jmp 0x4109de
cmp eax, 0xffffffff
jne 0x4109da
mov bl, 1
mov byte [esp + 0x20], bl
jmp 0x4109de
xor eax, eax
mov bh, al
mov ecx, edi
call fcn.00413d74
mov ecx, esi
call fcn.0042b3a3
cmp bh, 1
jne 0x410a0e
test bl, bl
je 0x410a0e
push dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
push dword [esp + 0x24]
or edx, 0xffffffff
call fcn.0040ff02
test eax, eax
setne bh
mov al, bh
jmp 0x4102fd