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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x104
mov eax, dword [0x4d1698]
xor eax, esp
mov dword [esp + 0x100], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 0x20]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x60], edx
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebx + 0xc]
push 1
mov dword [esp + 0x60], edx
mov dword [ebx], esi
mov dword [ebx + 4], esi
mov byte [ecx + 0xdf4], 0
push eax
mov edx, str.System_function
lea eax, [esp + 0xa8]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x78], edi
mov dword [esp + 0xa8], esi
mov byte [esp + 0xac], 0
mov dword [esp + 0xcc], esi
mov dword [esp + 0xd0], esi
mov dword [esp + 0xd4], esi
mov dword [esp + 0xc8], esi
mov dword [esp + 0xb8], esi
mov dword [esp + 0xbc], esi
mov byte [esp + 0xc0], 0
call fcn.00422710
mov edx, dword [ebx + 0xc]
cmp edi, esi
setne al
movzx ecx, al
mov dword [esp + 0xdc], edx
push ecx
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0xe0]
mov dword [esp + 0xf4], esi
mov byte [esp + 0xf8], 0
mov dword [esp + 0xe8], ebx
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], esi
mov word [esp + 0xe2], si
call fcn.004184d0
cmp eax, esi
jl 0x40593c
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x7c], eax
add eax, 0x1c
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, dword [eax + 0x14]
mov eax, dword [ecx + 0x14]
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x1c], eax
call fcn.00406770
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x2c]
cmp edi, 0xb
jbe 0x40590e
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [ebx + 0xc]
call fcn.00424460
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0xb4], eax
cmp eax, esi
jne 0x405974
cmp edi, 0xb
jbe 0x40593c
mov eax, dword [esp + 0x2c]
cmp eax, esi
je 0x40593c
push eax
call dword [0x4d5464]
add esp, 4
lea edi, [esp + 0xd8]
call fcn.00418480
cmp dword [esp + 0xec], 0xb
jbe 0x405f64
mov eax, dword [esp + 0xf0]
cmp eax, esi
je 0x405f64
push eax
call dword [0x4d5464]
add esp, 4
jmp 0x405f64
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 8]
add edx, dword [esp + 0xb0]
mov eax, dword [eax + 0xc]
push edx
add ecx, 0x28
call fcn.00432f40
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x40599b
mov eax, dword [eax + 0x14]
jmp 0x40599f
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
push ecx
push 1
push eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
lea edx, [esp + 0xac]
push edx
push ecx
lea edx, [esp + 0x94]
push edx
mov ecx, ebx
call fcn.00406b20
mov esi, eax
lea eax, [edi + 0x38]
call fcn.00410df0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
lea esi, [edi + 0x38]
lea eax, [esp + 0x3c]
mov dword [esp + 0x14], edx
call fcn.00410aa0
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x405a0c
cmp dword [eax + 4], 0x2e
jne 0x405a0c
mov eax, dword [eax + 0x14]
or byte [esp + 0x48], 1
test eax, eax
je 0x405a0c
mov eax, dword [eax + 0x14]
mov byte [esp + 0xf], 0
test eax, eax
je 0x405a8a
cmp dword [eax + 4], 0xe
jne 0x405a8a
test byte [esp + 0x48], 4
je 0x405a85
mov ecx, dword [esp + 0x40]
test dword [ecx + 0x98], 0x40000
je 0x405a85
push str.Autohandles_cannot_be_used_with_types_that_have_been_registered_with_NOCOUNT
mov eax, 0x4c
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], 0
mov byte [esp + 0x54], 0
call fcn.00432f40
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x1c]
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0xa4]
mov edi, ebx
call fcn.00406650
cmp dword [esp + 0x4c], 0xb
jbe 0x405a85
mov eax, dword [esp + 0x50]
test eax, eax
je 0x405a85
push eax
call dword [0x4d5464]
add esp, 4
mov byte [esp + 0xf], 1
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x3c]
lea eax, [edi + 0x38]
call fcn.00410df0
mov cl, byte [esp + 0xf]
test cl, cl
je 0x405aee
mov al, byte [edi + 0x44]
test al, 4
je 0x405aad
test al, 1
je 0x405aee
cmp dword [esp + 0x28], 0xb
jbe 0x405ac6
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x405ac6
push eax
call dword [0x4d5464]
add esp, 4
lea edi, [esp + 0xd8]
call fcn.00418480
cmp dword [esp + 0xec], 0xb
jbe 0x405f64
mov eax, dword [esp + 0xf0]
test eax, eax
jmp 0x40595f
mov eax, dword [esp + 0x24]
test eax, eax
je 0x405af8
mov byte [eax], cl
cmp byte [ebp + 0x14], 0
je 0x405b18
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x405b18
test byte [eax + 0x98], 1
je 0x405b18
test byte [edi + 0x44], 5
je 0x405f4f
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x14]
mov dword [esp + 0x24], eax
mov eax, dword [eax + 0x1c]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test eax, eax
je 0x405b57
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x14]
inc ecx
test eax, eax
je 0x405b53
cmp dword [eax], 5
jne 0x405b43
mov eax, dword [eax + 0x14]
test eax, eax
je 0x405b53
cmp dword [eax], 0xe
jne 0x405b4f
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x405b30
mov dword [esp + 0x1c], ecx
mov esi, dword [esp + 0x1c]
push 0
add edi, 0x48
push esi
mov dword [esp + 0x1c], edi
call fcn.00407c80
mov edi, dword [esp + 0x18]
add edi, 0x5c
mov dword [esp + 0x74], edi
cmp esi, dword [edi + 8]
jbe 0x405b88
push 1
push esi
push edi
call fcn.00408040
cmp esi, dword [edi + 8]
ja 0x405b8b
mov dword [edi + 4], esi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
push 0
add esi, 0x70
push edi
mov dword [esp + 0x80], esi
call fcn.00418330
mov esi, dword [esp + 0x18]
push 0
add esi, 0x84
push edi
mov dword [esp + 0x6c], esi
call fcn.00418330
mov esi, dword [esp + 0x60]
test esi, esi
je 0x405bcb
push 0
push edi
call fcn.00407ec0
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x1c]
mov dword [esp + 0x10], eax
test eax, eax
je 0x405e73
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
test ecx, ecx
je 0x405bf7
mov eax, dword [ecx + 0x14]
jmp 0x405bfb
mov eax, dword [esp + 0x5c]
push ecx
push 0
push eax
lea edx, [esp + 0xac]
push edx
push esi
lea eax, [esp + 0x50]
push eax
mov ecx, ebx
call fcn.00406b20
mov eax, dword [esi + 0x14]
lea ecx, [esp + 0xf]
push ecx
lea edx, [esp + 0xa4]
push edx
push eax
push ebx
lea eax, [esp + 0x78]
lea ecx, [esp + 0x4c]
lea ebx, [esp + 0xa0]
call fcn.00407740
mov bl, byte [esp + 0x48]
mov esi, eax
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp + 0x3c], ecx
mov cl, byte [esi + 0xc]
mov esi, dword [esi + 8]
mov dl, cl
xor dl, bl
and dl, 1
xor bl, dl
mov al, cl
xor al, bl
and al, 0x1e
xor bl, al
xor cl, bl
and cl, 0x20
xor bl, cl
cmp byte [ebp + 0x14], 0
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], esi
mov byte [esp + 0x48], bl
je 0x405c8f
test edi, edi
je 0x405c8f
test byte [edi + 0x98], 1
je 0x405c8f
test bl, 5
je 0x405f4f
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 4]
cmp ecx, eax
jne 0x405cbd
mov edi, dword [esp + 0x14]
test eax, eax
jne 0x405caa
push eax
push 1
jmp 0x405cb0
push 1
lea ecx, [eax + eax]
push ecx
call fcn.00407c80
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 8]
je 0x405ce9
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x3c]
mov eax, ecx
inc ecx
mov dword [edx + 4], ecx
shl eax, 4
add eax, dword [edx]
mov edx, dword [esp + 0x40]
mov cl, byte [eax + 0xc]
xor cl, bl
and cl, 0x3f
xor byte [eax + 0xc], cl
mov dword [eax], edi
mov dword [eax + 4], edx
mov dword [eax + 8], esi
jmp 0x405ced
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x78]
lea edx, [esp + 0x68]
push edx
call fcn.00422500
cmp edi, 0x50
je 0x405f4f
cmp byte [esp + 0xf], 0
je 0x405d1d
test bl, 4
je 0x405ea4
test bl, 1
jne 0x405ea4
mov eax, dword [esp + 0x60]
xor esi, esi
cmp eax, esi
je 0x405d31
lea ecx, [esp + 0xf]
push ecx
call fcn.00407fb0
cmp edi, 0x3b
jne 0x405d3f
test bl, 1
je 0x405f4f
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x14]
mov edi, dword [eax + 0x14]
mov dword [esp + 0x10], edi
cmp edi, esi
je 0x405db9
cmp dword [edi], 5
jne 0x405db9
mov ecx, dword [edi + 8]
add ecx, dword [esp + 0xb0]
mov eax, dword [edi + 0xc]
push ecx
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], esi
mov byte [esp + 0x54], 0
call fcn.00432f40
mov edx, dword [esp + 0x74]
mov ecx, dword [edx]
mov eax, dword [esp + 0x4c]
add ecx, dword [esp + 0x1c]
lea edx, [esp + 0x50]
cmp eax, 0xb
jbe 0x405d91
mov edx, dword [esp + 0x50]
push edx
call fcn.00432f40
cmp dword [esp + 0x4c], 0xb
jbe 0x405db0
mov eax, dword [esp + 0x50]
cmp eax, esi
je 0x405db0
push eax
call dword [0x4d5464]
add esp, 4
mov eax, dword [edi + 0x14]
mov dword [esp + 0x10], eax
mov edi, eax
add dword [esp + 0x1c], 0x10
cmp edi, esi
je 0x405e55
cmp dword [edi], 0xe
jne 0x405e55
push 0x10
call dword [0x4d5460]
mov ebx, eax
add esp, 4
cmp ebx, esi
je 0x405e4a
mov ecx, dword [esp + 0x38]
mov dword [ebx], esi
push ecx
lea edx, [esp + 0xa4]
mov eax, edi
lea esi, [esp + 0x84]
mov byte [ebx + 4], 0
mov dword [esp + 0x14], ebx
call fcn.00406500
mov ecx, dword [eax]
cmp ecx, 0xb
ja 0x405e10
add eax, 4
jmp 0x405e13
mov eax, dword [eax + 4]
push eax
mov eax, ecx
mov ecx, ebx
call fcn.00432f40
cmp dword [esp + 0x80], 0xb
jbe 0x405e3c
mov eax, dword [esp + 0x84]
test eax, eax
je 0x405e3c
push eax
call dword [0x4d5464]
add esp, 4
mov eax, dword [esp + 0x64]
lea edx, [esp + 0x10]
push edx
call fcn.00422500
mov eax, dword [edi + 0x14]
mov dword [esp + 0x10], eax
mov edi, eax
jmp 0x405e67
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x70], esi
call fcn.00422500
mov ebx, dword [esp + 0x38]
test edi, edi
jne 0x405be6
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x14]
test eax, eax
je 0x405eca
cmp dword [eax], 0
jne 0x405eca
cmp dword [eax + 4], 0x5a
jne 0x405eca
cmp dword [esp + 0x20], 0
je 0x405f4f
mov ecx, dword [esp + 0x18]
mov byte [ecx + 0x98], 1
mov eax, dword [eax + 0x14]
jmp 0x405ed5
cmp dword [esp + 0x28], 0xb
jbe 0x405f58
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x405f58
push eax
call dword [0x4d5464]
add esp, 4
jmp 0x405f58
mov edx, dword [esp + 0x18]
mov byte [edx + 0x98], 0
mov ecx, dword [esp + 0x70]
test ecx, ecx
je 0x405eef
test eax, eax
je 0x405f4f
cmp dword [eax], 0x2a
jne 0x405f4f
mov dword [ecx], eax
call fcn.00431c10
jmp 0x405ef3
test eax, eax
jne 0x405f4f
mov eax, dword [esp + 0x7c]
push eax
lea ecx, [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0x20]
push ebx
call fcn.00404f50
cmp dword [ebx], 0
jg 0x405f4f
cmp dword [ebx + 4], 0
jg 0x405f4f
lea eax, [esp + 0x28]
call fcn.00432e80
lea eax, [esp + 0xd8]
call fcn.00418450
lea eax, [esp + 0xa0]
call fcn.004226b0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.0048c97b
mov esp, ebp
pop ebp
ret 0x1c
lea eax, [esp + 0x28]
call fcn.00432e80
lea eax, [esp + 0xd8]
call fcn.00418450
lea eax, [esp + 0xa0]
call fcn.004226b0
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 0xfffffff6
call fcn.0048c97b
mov esp, ebp
pop ebp
ret 0x1c