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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x344
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax]
push ebx
mov dword [esp + 0x4c], eax
xor edx, edx
mov dword [esp + 0x50], ecx
xor eax, eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov byte [esp + 0x150], dl
mov ecx, 0x3f
lea edi, [esp + 0x151]
rep stosd dword es:[edi], eax
mov cx, word [esi + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ax, word [esi + 0x3a]
mov edi, dword [esi]
mov word [esp + 0x68], ax
mov word [esp + 0x50], cx
lea eax, [esp + 0x18]
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x1c]
cmp eax, edx
mov dword [esp + 0x20], ecx
mov cl, byte [esi + 0x18]
mov dword [esp + 0x10], edx
mov byte [esp + 0xe], dl
mov dword [esp + 0x18], 0x4c6a9b4
mov byte [esp + 0x24], cl
mov dword [esp + 0x28], edx
je 0x4c20a01
push eax
call fcn.04c35c80
add esp, 4
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 0x20]
mov bl, byte [esi + 0x18]
mov cx, word [esi + 0x30]
mov dword [esp + 0x5c], eax
xor eax, eax
cmp edi, eax
mov dword [esp + 0x14], edx
mov edx, dword [esi + 0x24]
mov byte [esp + 0xd], bl
mov word [esp + 0x60], cx
mov dword [esp + 0x6c], eax
je 0x4c20a40
mov eax, edi
lea ecx, [eax + 1]
mov dword [esp + 0x64], ecx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c20a35
sub eax, dword [esp + 0x64]
lea ecx, [esp + 0x38]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x3c], ecx
xor ecx, ecx
mov dword [esp + 0x30], eax
cmp dword [esi + 0x40], ecx
mov dword [esp + 0x38], 0x4c6a9b4
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], 1
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], edx
mov byte [esp + 0x44], bl
jne 0x4c20a7f
mov dword [esp + 0x4c], ecx
mov edx, dword [ebp + 0x14]
push edx
mov edx, dword [esp + 0x58]
push pe_nt_image_headers32
lea eax, [esp + 0x158]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
lea eax, [esp + 0x40]
push eax
call fcn.04c3d400
mov bl, al
add esp, 0x18
test bl, bl
je 0x4c20b04
cmp bl, 2
je 0x4c20afd
mov esi, dword [ebp + 0x10]
push 0x4c798b0
push esi
call fcn.04c29c10
mov al, byte [esp + 0x158]
add esp, 8
test al, al
jne 0x4c20aec
movzx ecx, bl
push ecx
push pe_nt_image_headers32
lea edx, [esp + 0x158]
push edx
push 0x251c
call fcn.04c2f320
add esp, 0x10
lea eax, [esp + 0x150]
push eax
push esi
call fcn.04c29fa0
add esp, 8
xor edi, edi
jmp 0x4c21077
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4c20b1a
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.04c3d0f0
add esp, 8
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
call fcn.04c2dbb0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je case.0x4c20d72.3
xor eax, eax
mov ecx, 0x1a
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x14]
xor ecx, ecx
test eax, eax
setne cl
mov word [esp + 0x70], 0x6a
mov byte [esp + 0x73], 0
mov edx, dword [ebx + 0x4c]
shl ecx, 1
xor ecx, edx
and ecx, 2
xor edx, ecx
test eax, eax
mov dword [ebx + 0x4c], edx
je 0x4c20b88
mov edx, eax
push str.local
push edx
call fcn.04c59caa
add esp, 8
test eax, eax
jne 0x4c20b92
mov eax, dword [ebp + 8]
add eax, 0x4d
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
push 0x1f
push ecx
lea edx, [esp + 0xa4]
push edx
call fcn.04c59760
mov eax, dword [esi + 0x3c]
add esp, 0xc
test eax, eax
je 0x4c20bd2
push str.local
push eax
call fcn.04c59caa
add esp, 8
test eax, eax
je 0x4c20bd2
mov eax, dword [esi + 0x3c]
push 0x1f
push eax
lea ecx, [esp + 0xc3]
push ecx
jmp 0x4c20be3
mov edx, dword [ebp + 8]
push 0x1f
add edx, 0x2e
push edx
lea eax, [esp + 0xc3]
push eax
call fcn.04c59760
add esp, 0xc
lea ecx, [esp + 0x9c]
push str.unspecified
push ecx
mov byte [esp + 0x17], 0
call fcn.04c5f82c
add esp, 8
test eax, eax
jne 0x4c20c0e
mov byte [esp + 0xf], 1
mov eax, dword [esp + 0x58]
cmp eax, 1
je 0x4c20c42
jle 0x4c20c27
cmp eax, 4
jg 0x4c20c27
mov word [esp + 0x74], 0
jmp 0x4c20c49
lea ecx, [esp + 0x2c]
call fcn.04c20940
lea ecx, [esp + 0x18]
call fcn.04c20870
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov word [esp + 0x74], 2
mov eax, 8
mov byte [esp + 0x76], al
mov word [esp + 0x84], ax
mov eax, dword [esp + 0x50]
test ax, ax
mov byte [esp + 0x77], 0
mov byte [esp + 0x92], 3
mov word [esp + 0x90], 0x138a
mov byte [esp + 0x72], 2
jle 0x4c20c8a
cmp ax, 0x1e
jge 0x4c20c8a
mov eax, 0x1e
movzx dx, byte [esp + 0xd]
mov word [esp + 0x78], ax
mov eax, dword [esp + 0x60]
test ax, ax
mov word [esp + 0x7a], dx
mov word [esp + 0x86], ax
jne 0x4c20cbc
mov word [esp + 0x86], 0x5b4
mov ecx, 1
jmp 0x4c20cc0
mov ecx, dword [esp + 0x6c]
mov eax, dword [esi + 0x34]
cmp eax, 2
je 0x4c20ccb
or ecx, 2
test eax, eax
jne 0x4c20cd2
or ecx, 4
mov ax, word [esi + 0x38]
mov dword [esp + 0x88], ecx
mov cx, word [esp + 0x68]
lea edx, [esp + 0xe0]
mov word [esp + 0x8c], ax
push edx
lea eax, [esp + 0x74]
mov word [esp + 0x92], cx
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.04c3d660
add esp, 0xc
test al, al
je 0x4c20d3d
cmp al, 6
jne case.0x4c20d72.3
mov esi, dword [ebp + 0x10]
push 0x4c798b0
push esi
call fcn.04c29c10
push pe_nt_image_headers32
lea edx, [esp + 0x15c]
push edx
push 0x25ef
jmp 0x4c20fcc
mov esi, dword [ebp + 8]
lea ecx, [esp + 0xbb]
push ecx
lea eax, [esp + 0x12f]
call fcn.04c20810
add esp, 4
test al, al
jne 0x4c20d60
mov byte [esp + 0xe], 1
movzx eax, byte [esp + 0xe3]
dec eax
cmp eax, 4
ja case.0x4c20d72.4
jmp dword [eax*4 + 0x4c2116c]
push 0x4c7c534
jmp 0x4c2105b
cmp word [esp + 0xf4], 2
jae 0x4c20dc9
mov al, byte [esp + 0xf]
test al, al
jne case.0x4c20d72.4
mov esi, dword [ebp + 0x10]
push 0x4c7c87c
push esi
call fcn.04c29c10
lea edx, [esp + 0xa4]
push edx
push esi
call fcn.04c29fa0
push str.database_character_set
push esi
call fcn.04c29fa0
add esp, 0x18
jmp 0x4c20e65
test byte [ebx + 0x4c], 2
mov esi, dword [ebp + 0x10]
je 0x4c20df3
push 0x4c794c0
push esi
call fcn.04c29c10
lea eax, [esp + 0xa4]
push eax
push esi
call fcn.04c29fa0
add esp, 0x10
jmp 0x4c21067
mov al, byte [esp + 0xe]
test al, al
je 0x4c20e35
push 0x4c7c8d0
push esi
call fcn.04c29c10
lea ecx, [esp + 0xa4]
push ecx
push esi
call fcn.04c29fa0
lea edx, [esp + 0xcb]
push edx
push esi
call fcn.04c29fa0
lea eax, [esp + 0x143]
push eax
push esi
call fcn.04c29fa0
add esp, 0x20
jmp 0x4c20e65
push 0x4c7c898
push esi
call fcn.04c29c10
lea ecx, [esp + 0xa4]
push ecx
push esi
call fcn.04c29fa0
lea edx, [esp + 0x11c]
push edx
jmp 0x4c20e8e
push 0x4c79808
jmp 0x4c2105b
mov esi, dword [ebp + 0x10]
mov al, byte [esp + 0xe]
test al, al
je 0x4c20e97
push 0x4c7c8b4
push esi
call fcn.04c29c10
lea eax, [esp + 0xc3]
push eax
push esi
call fcn.04c29fa0
lea ecx, [esp + 0x13b]
push ecx
push esi
call fcn.04c29fa0
add esp, 0x18
mov dl, byte [esp + 0xe2]
mov esi, dword [ebp + 0x14]
mov byte [ebx + 0x28], dl
mov ax, word [esp + 0xf4]
mov word [ebx + 0x2a], ax
mov cl, byte [esp + 0xe6]
mov byte [ebx + 0x2c], cl
mov dl, byte [esp + 0xe7]
mov byte [ebx + 0x2d], dl
mov al, byte [esp + 0x102]
mov byte [ebx + 0x2e], al
mov cx, word [esp + 0x100]
push esi
mov word [ebx + 0x30], cx
call fcn.04c1e730
add esp, 4
test eax, eax
mov edi, 6
je 0x4c20f38
cmp byte [ebx + 0x28], 2
ja 0x4c20ef8
cmp word [ebx + 0x2a], di
jb 0x4c20f38
movzx edx, word [esp + 0x100]
movzx eax, byte [ebx + 0x2e]
movzx ecx, byte [ebx + 0x2d]
push edx
movzx edx, byte [ebx + 0x2c]
push eax
push ecx
push edx
push pe_nt_image_headers32
lea eax, [esp + 0x164]
push eax
push 0x271f
call fcn.04c2f320
lea ecx, [esp + 0x16c]
push ecx
push esi
call fcn.04c29090
add esp, 0x24
mov ecx, dword [ebp + 8]
push 0
lea edx, [esp + 0x12f]
push edx
mov edx, dword [ecx + 0x70]
lea eax, [esp + 0x114]
push eax
push edx
call fcn.04c36e90
add esp, 0x10
test eax, eax
mov dword [ebx + 0x34], eax
jne 0x4c20f9b
mov esi, dword [ebp + 0x10]
push 0x4c798b0
push esi
call fcn.04c29c10
push pe_nt_image_headers32
lea eax, [esp + 0x15c]
push eax
push 0x251b
call fcn.04c2f320
lea ecx, [esp + 0x164]
push ecx
push esi
call fcn.04c29fa0
add esp, 0x1c
jmp 0x4c21067
cmp word [esp + 0xf4], di
jae 0x4c20ff4
cmp byte [esp + 0xd], 1
jbe 0x4c20fe7
mov esi, dword [ebp + 0x10]
push 0x4c798b0
push esi
call fcn.04c29c10
push pe_nt_image_headers32
lea edx, [esp + 0x15c]
push edx
push 0x255e
call fcn.04c2f320
lea eax, [esp + 0x164]
push eax
push esi
call fcn.04c29fa0
add esp, 0x1c
jmp 0x4c21067
mov cl, byte [esp + 0xea]
mov byte [esp + 0x24], cl
jmp 0x4c2100f
mov al, byte [esp + 0xea]
mov cl, byte [esp + 0xd]
cmp al, cl
je 0x4c2100f
test cl, cl
jne 0x4c20fac
cmp al, 1
jne 0x4c20fac
mov byte [esp + 0x24], al
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push edx
call fcn.04c3d0a0
add esp, 8
test eax, eax
je 0x4c21056
mov eax, dword [esp + 0xe8]
test ax, ax
je 0x4c21045
cmp ax, 0xffff
je 0x4c21045
push eax
mov eax, dword [esp + 0x14]
push eax
call fcn.04c3d080
add esp, 8
mov ecx, dword [esp + 0x10]
push ecx
call fcn.04c3d0b0
add esp, 4
test eax, eax
jne 0x4c210c9
push 0x4c79904
mov esi, dword [ebp + 0x10]
push esi
call fcn.04c29c10
add esp, 8
xor edi, edi
cmp ebx, edi
je 0x4c21077
push esi
push ebx
call fcn.04c20450
add esp, 8
mov eax, dword [esp + 0x48]
cmp eax, edi
mov esi, 0x4c6a9b4
mov dword [esp + 0x38], esi
je 0x4c21095
push eax
call fcn.04c33f10
mov dword [esp + 0x4c], edi
add esp, 4
lea ecx, [esp + 0x38]
call fcn.04c35480
mov eax, dword [esp + 0x28]
cmp eax, edi
mov dword [esp + 0x18], esi
je 0x4c210b7
push eax
call fcn.04c33f10
add esp, 4
mov dword [esp + 0x28], edi
lea ecx, [esp + 0x18]
call fcn.04c35480
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xe8]
test ax, ax
je 0x4c210e8
cmp ax, 0xffff
je 0x4c210e8
mov edx, dword [esp + 0x10]
push edx
call fcn.04c3cf30
add esp, 4
test byte [esp + 0xf8], 4
mov esi, dword [ebp + 0x14]
je 0x4c2112a
push esi
call fcn.04c1e730
add esp, 4
test eax, eax
je 0x4c2112a
push pe_nt_image_headers32
lea eax, [esp + 0x254]
push eax
push 0x25fc
call fcn.04c2f320
lea ecx, [esp + 0x25c]
push ecx
push esi
call fcn.04c29090
add esp, 0x14
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jle 0x4c21144
mov edx, dword [ebx + 0x34]
push eax
push esi
mov dword [eax + 8], edx
call fcn.04c205c0
add esp, 8
mov ecx, esi
call fcn.04c204e0
lea ecx, [esp + 0x2c]
mov dword [ebx + 0x3c], esi
call fcn.04c20940
lea ecx, [esp + 0x18]
call fcn.04c20870
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret