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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x9ac
test eax, eax
push ebx
push ebp
push esi
push edi
jne 0x40ffa3
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0x9ac
ret 0x1c
mov ecx, dword [0x4918ec]
mov eax, dword [eax + 0x54]
push ecx
push eax
call fcn.0040f3f0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40ffcd
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x9ac
ret 0x1c
mov ax, word [ebp + 0x44]
test ax, ax
je 0x410585
cmp ax, 0xffff
je 0x410585
mov cx, word [ebp + 0x1a4]
mov esi, dword [esp + 0x9d0]
cmp si, cx
jae 0x410574
cmp si, 7
ja 0x410012
pop edi
pop esi
pop ebp
mov ax, 4
pop ebx
add esp, 0x9ac
ret 0x1c
mov ebx, dword [esp + 0x9d8]
cmp bl, 7
ja 0x410134
mov eax, dword [ebp + 0x1c8]
test eax, eax
je 0x410145
mov eax, dword [ebp + 0x1b4]
cmp eax, 5
je 0x410044
cmp eax, 7
jne 0x410145
cmp bl, 4
je 0x410053
cmp bl, 5
je 0x410053
cmp bl, 6
jne 0x410069
cmp eax, 7
jne 0x410134
test byte [ebp + 0x1bc], 8
je 0x410134
test byte [ebp + 0x1b8], 4
je 0x410145
lea edx, [esp + 0x10]
lea edi, [ebp + 0x1cc]
push edx
lea edx, [esp + 0x110]
push 0x50
push edx
mov edx, dword [esp + 0x9e0]
push edi
push ebx
push edx
mov edx, dword [esp + 0x9e4]
push esi
push edx
mov edx, dword [esp + 0x9e8]
push edx
mov edx, dword [esp + 0x9e8]
push edx
push ecx
push eax
call fcn.004157f0
test ax, ax
jne 0x41011d
lea eax, [esp + 0x14]
lea ecx, [esp + 0x15c]
push eax
mov eax, dword [esp + 0x14]
push 0x50
push ecx
mov ecx, dword [esp + 0x9cc]
lea edx, [esp + 0x118]
push 0x50
push edx
push eax
push ecx
call fcn.004114a0
test ax, ax
jne 0x41011d
lea edx, [esp + 0x60]
push edx
push edi
call fcn.004154c0
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10c]
push eax
push 0x50
lea edx, [esp + 0x68]
push ecx
mov ecx, dword [ebp + 0x1b4]
lea eax, [esp + 0x168]
push edx
push eax
push ecx
call fcn.00416490
push ebp
push eax
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
pop edi
pop esi
pop ebp
mov ax, 6
pop ebx
add esp, 0x9ac
ret 0x1c
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x37c]
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x50c]
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x1ec]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ecx
lea edi, [esp + 0xa4]
mov dword [esp + 0x2c], ecx
mov ecx, 0xc
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0xd8]
mov dword [esp + 0x58], edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x70]
mov dword [esp + 0x5c], edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x30]
movsx edx, word [ebp + 0x5a]
mov ax, word [ebp + edx*2 + 0x46]
push eax
push 0x45203c
push ecx
call fcn.004362ea
xor edx, edx
lea eax, [esp + 0x30]
mov dx, word [ebp + 0x44]
push edx
push 0x45203c
push eax
call fcn.004362ea
mov ecx, dword [esp + 0x9dc]
lea edx, [esp + 0xbc]
and ecx, 0xffff
push ecx
push 0x45203c
push edx
call fcn.004362ea
mov eax, dword [esp + 0x9ec]
lea ecx, [esp + 0xfc]
and eax, 0xffff
push eax
push 0x45203c
push ecx
call fcn.004362ea
mov edx, dword [esp + 0x9fc]
lea eax, [esp + 0xa0]
and edx, 0xffff
push edx
push 0x45203c
push eax
call fcn.004362ea
and esi, 0xffff
lea ecx, [esp + 0x54]
push esi
push 0x45203c
push ecx
call fcn.004362ea
mov edx, dword [esp + 0xa1c]
add esp, 0x48
and edx, 0xffff
lea eax, [esp + 0x48]
push edx
push 0x45203c
push eax
call fcn.004362ea
and ebx, 0xff
lea ecx, [esp + 0x48]
push ebx
push 0x45203c
push ecx
call fcn.004362ea
mov eax, dword [esp + 0x9d8]
add esp, 0x18
lea edx, [esp + 0x1ac]
push 0x40
push edx
push eax
call fcn.0040ccc0
test ax, ax
jne 0x410589
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x48]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x78]
push eax
lea edx, [esp + 0xe4]
push ecx
lea eax, [esp + 0xb4]
push edx
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x48]
push ecx
push edx
push 8
push 0x452034
call fcn.0041a9f0
mov edx, eax
add esp, 0x28
test edx, edx
jne 0x41034a
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x50c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00434c6c
lea ecx, [esp + 0x58]
lea edx, [esp + 0x510]
push ecx
push edx
push str.overwriteKey
push 3
push 0x451f24
call fcn.0041a9f0
mov edx, eax
add esp, 0x18
test edx, edx
jne 0x4103b5
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x1ec]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00434c6c
lea ecx, [esp + 0x1f0]
push ecx
call fcn.0041aad0
mov edx, eax
add esp, 8
test edx, edx
jne 0x41040f
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x1ec]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00434c6c
lea ecx, [esp + 0x380]
lea edx, [esp + 0x1f0]
push ecx
push ebp
push edx
call fcn.00418080
add esp, 0x10
test ax, ax
je 0x410470
push ebp
push eax
call fcn.0040d260
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
lea eax, [esp + 0x37c]
push eax
call fcn.0041a7c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x41049e
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
lea ecx, [esp + 0x37c]
lea edx, [esp + 0x82c]
push ecx
lea eax, [esp + 0x6a0]
push edx
push eax
push esi
push 3
push 0x451f24
call fcn.0041a620
push esi
mov edi, eax
call fcn.00434c6c
add esp, 0x1c
test di, di
je 0x4104eb
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
mov esi, str.error
lea eax, [esp + 0x69c]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x41051f
test cl, cl
je 0x41051b
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x41051f
add eax, 2
add esi, 2
test cl, cl
jne 0x4104f7
xor eax, eax
jmp 0x410524
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x41054c
lea eax, [esp + 0x82c]
push eax
call fcn.004366a5
push ebp
push eax
call fcn.0040d340
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
lea esi, [ebp + 0x68]
push esi
call fcn.0043c802
mov edi, dword [esi]
push ebp
add edi, 0x78
push 0
mov dword [esi], edi
call fcn.0040d340
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c
pop edi
pop esi
pop ebp
mov ax, 5
pop ebx
add esp, 0x9ac
ret 0x1c
mov ax, 0x47
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9ac
ret 0x1c