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

Disassembly:
push 0xffffffffffffffff
push 0x51fe42
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xcc
mov al, byte [0x8c7780]
push ebx
push ebp
xor ebp, ebp
push esi
push edi
test al, 1
mov dword [esp + 0x4c], ebp
jne 0x5010f8
or al, 1
mov ecx, 0x8c77a0
mov byte [0x8c7780], al
lea eax, [esp + 0x37]
push eax
call fcn.00501d90
lea ecx, [esp + 0x1b]
lea edx, [esp + 0x13]
push ecx
push edx
mov ecx, 0x8c77ac
mov dword [esp + 0xec], 1
call fcn.00501e70
push 0x501ae0
mov byte [esp + 0xe8], 0
call fcn.004ee5bb
add esp, 4
mov edi, dword [esp + 0xf0]
lea eax, [esp + 0x14]
push edi
push eax
mov ecx, 0x8c77ac
call fcn.00502530
mov ebx, dword [eax]
mov eax, dword [0x8c77b0]
cmp ebx, eax
je 0x501233
mov ecx, dword [0x8c77a4]
mov eax, dword [ecx + 4]
mov ecx, dword [ebx + 0x10]
cmp eax, ecx
je 0x50120d
mov dl, byte [esp + 0x13]
push ebp
push ebp
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], dl
call fcn.005023a0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebp
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0xe4], 2
cmp eax, ecx
je 0x50118e
mov edx, dword [ecx]
cmp eax, edx
je 0x50118e
push edx
push ecx
push 0x8c77a0
push eax
lea ecx, [esp + 0x2c]
call fcn.005023d0
mov ecx, dword [esp + 0x24]
mov eax, dword [0x8c77a8]
inc ecx
dec eax
mov dword [0x8c77a8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ecx
mov edx, dword [eax]
mov ecx, dword [0x8c77a4]
cmp ecx, edx
je 0x5011d2
mov esi, dword [edx]
cmp ecx, esi
je 0x5011d2
push esi
lea eax, [esp + 0x20]
push edx
push eax
push ecx
mov ecx, 0x8c77a0
call fcn.005023d0
mov ecx, dword [0x8c77a8]
mov eax, dword [esp + 0x24]
inc ecx
dec eax
mov dword [0x8c77a8], ecx
mov ecx, dword [0x8c77a4]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [ecx + 4]
push eax
mov dword [ebx + 0x10], ecx
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0xec], 0
call fcn.00501e20
mov edx, dword [eax]
lea eax, [esp + 0x40]
push edx
push eax
lea ecx, [esp + 0x28]
call fcn.00502340
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0050fefc
add esp, 4
mov edx, dword [0x8c77a4]
mov esi, dword [esp + 0xec]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 8]
add eax, 0xc
mov dword [esi], ecx
push eax
lea ecx, [esi + 4]
call fcn.005018c0
jmp 0x50172f
push 0x43c
call fcn.0050fed3
mov esi, eax
add esp, 4
mov dword [esp + 0x3c], esi
cmp esi, ebp
mov dword [esp + 0xe4], 3
je 0x5015b6
mov eax, dword [edi]
mov ecx, esi
push eax
call fcn.005018e0
lea edx, [esp + 0x13]
lea eax, [esp + 0x1b]
push edx
lea ecx, [esi + 0x404]
push eax
call fcn.005067f0
lea edx, [esp + 0x36]
lea eax, [esp + 0x35]
push edx
lea ecx, [esi + 0x414]
push eax
mov byte [esp + 0xec], 4
call fcn.00506a20
lea ecx, [esp + 0x3a]
lea edx, [esp + 0x39]
push ecx
push edx
lea ecx, [esi + 0x424]
mov byte [esp + 0xec], 5
call fcn.00506b80
lea ecx, [esp + 0x28]
mov byte [esp + 0xe4], 6
call fcn.00507160
lea eax, [esp + 0x60]
mov byte [esp + 0xe4], 7
push eax
call fcn.00509740
add esp, 4
mov eax, dword [esp + 0x68]
mov byte [esp + 0xe4], 8
cmp eax, ebp
je 0x5013c2
lea edx, [esp + 0x60]
lea ecx, [esp + 0x1c]
call fcn.0050d260
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0xe8], 9
call fcn.00506760
lea ecx, [esp + 0x20]
mov byte [esp + 0xe4], 8
call fcn.004fbb90
cmp dword [esp + 0x28], ebp
jne 0x5013cc
lea ecx, [esp + 0x33]
push ecx
push str.Unable_to_open_message_catalog:
lea ecx, [esp + 0xa8]
call fcn.00501900
lea edx, [esp + 0x60]
lea eax, [esp + 0xa0]
push edx
lea ecx, [esp + 0xb4]
mov bl, 0xa
push eax
push ecx
mov byte [esp + 0xf0], bl
call fcn.0050b450
add esp, 0xc
push eax
lea ecx, [esp + 0xc4]
mov byte [esp + 0xe8], 0xb
call fcn.00501750
push 1
lea ecx, [esp + 0xb4]
mov byte [esp + 0xe8], 0xd
call fcn.004fb8b1
lea ecx, [esp + 0xc0]
call fcn.0050c3c0
lea ecx, [esp + 0xc0]
mov byte [esp + 0xe4], bl
call fcn.004fd310
push 1
lea ecx, [esp + 0xa4]
mov byte [esp + 0xe8], 8
call fcn.004fb8b1
cmp dword [esp + 0x28], ebp
je 0x501582
xor edi, edi
mov bl, 0x10
mov ecx, edi
call fcn.0050cbd0
lea edx, [esp + 0x3b]
lea ecx, [esp + 0x70]
push edx
mov ebp, eax
call fcn.004c89c0
mov al, byte [ebp]
mov byte [esp + 0xe4], 0xe
test al, al
je 0x50140a
push eax
push 1
lea ecx, [esp + 0x78]
call fcn.005019c0
mov al, byte [ebp + 1]
inc ebp
test al, al
jne 0x5013f6
mov edx, dword [esi]
lea eax, [esp + 0x70]
lea ecx, [edi + 0xc8]
push eax
push ecx
push edx
lea edx, [esp + 0x34]
lea ecx, [esp + 0x5c]
call fcn.0050d340
lea eax, [esp + 0x38]
lea ecx, [esp + 0x80]
push eax
mov byte [esp + 0xe8], 0xf
call fcn.004c89c0
mov eax, dword [esp + 0x58]
xor ebp, ebp
test eax, eax
mov byte [esp + 0xe4], bl
jbe 0x501474
push ebp
lea ecx, [esp + 0x54]
call fcn.004fdcb0
mov cl, byte [eax]
push ecx
push 1
lea ecx, [esp + 0x88]
call fcn.005019c0
mov eax, dword [esp + 0x58]
inc ebp
cmp ebp, eax
jb 0x501450
lea edx, [esp + 0x14]
lea ecx, [esi + 0x404]
push edx
mov dword [esp + 0x18], edi
call fcn.005068a0
mov ecx, dword [0x861d58]
lea edx, [esp + 0x80]
push ecx
push 0
push edx
mov ecx, eax
call fcn.004fb7e3
push 1
lea ecx, [esp + 0x84]
call fcn.004fb8b1
push 1
lea ecx, [esp + 0x54]
call fcn.004fb8b1
push 1
lea ecx, [esp + 0x74]
mov byte [esp + 0xe8], 8
call fcn.004fb8b1
inc edi
cmp edi, 0x14
jle 0x5013d0
mov al, byte [0x8c77bc]
test al, 1
jne 0x501506
mov bl, al
lea eax, [esp + 0x34]
or bl, 1
push eax
mov ecx, 0x8c77c0
mov byte [0x8c77bc], bl
call fcn.004c89c0
push 0x5063d0
call fcn.004ee5bb
add esp, 4
xor ebp, ebp
mov edi, 0x861e44
mov bl, 0x11
mov edx, dword [esi]
lea ecx, [ebp + 0x12c]
push 0x8c77c0
push ecx
push edx
lea edx, [esp + 0x34]
lea ecx, [esp + 0x9c]
call fcn.0050d340
mov eax, dword [esp + 0x98]
mov byte [esp + 0xe4], bl
test eax, eax
je 0x501557
lea eax, [esp + 0x90]
lea ecx, [esi + 0x414]
push eax
call fcn.00506ad0
mov ecx, dword [edi]
mov dword [eax], ecx
push 1
lea ecx, [esp + 0x94]
mov byte [esp + 0xe8], 8
call fcn.004fb8b1
add edi, 4
inc ebp
cmp edi, 0x861e78
jle 0x50150f
mov edi, dword [esp + 0xf0]
xor ebp, ebp
lea edx, [esi + 0x438]
push edx
push esi
call fcn.0050b580
add esp, 8
lea ecx, [esp + 0x60]
mov dword [esi + 0x434], eax
push 1
call fcn.004fb8b1
lea ecx, [esp + 0x2c]
mov byte [esp + 0xe4], 6
call fcn.004fbb90
jmp 0x5015b8
xor esi, esi
push esi
lea ecx, [esp + 0x4c]
mov byte [esp + 0xe8], 0
mov dword [esp + 0x48], esi
call fcn.0050a930
push esi
lea eax, [esp + 0x4c]
push esi
push eax
call fcn.004a5360
add esp, 0xc
lea ecx, [esp + 0x44]
mov ebx, 0x12
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xe8], ebx
call fcn.00501cd0
mov dword [esp + 0x24], ebp
mov eax, dword [0x8c77a4]
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [esp + 0x44]
mov ecx, 0x8c77a0
push eax
mov byte [esp + 0xf0], 0x13
call fcn.005022e0
lea ecx, [esp + 0x20]
mov byte [esp + 0xe4], bl
call fcn.004fbb90
mov eax, dword [0x8c77a4]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], eax
push edx
mov ecx, dword [eax + 4]
push edi
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x24]
call fcn.004c9970
mov ecx, eax
lea edx, [esp + 0x28]
push edx
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x30], ecx
push eax
mov ecx, 0x8c77ac
call fcn.00501f20
lea ecx, [esp + 0x3c]
push edi
push ecx
mov ecx, 0x8c77ac
call fcn.00502530
mov ecx, dword [0x8c77a4]
mov eax, dword [eax]
mov ebx, dword [esp + 0xf4]
add eax, 0xc
mov ecx, dword [ecx + 4]
mov dword [ecx + 0x10], eax
mov ebp, dword [0x8c77b8]
cmp ebp, ebx
jbe 0x501703
lea edx, [esp + 0x3c]
mov ecx, 0x8c77a0
push edx
call fcn.00501e20
mov esi, dword [eax]
mov ecx, dword [0x8c77a4]
cmp esi, ecx
mov dword [esp + 0x14], ecx
je 0x501703
cmp ebp, ebx
jbe 0x501703
mov eax, dword [esi + 0xc]
test eax, eax
je 0x5016fc
mov edx, dword [eax + 4]
cmp edx, 1
jne 0x5016fc
mov edi, esi
mov esi, dword [esi]
mov ecx, 0x8c77ac
mov eax, dword [edi + 0x10]
push eax
call fcn.00502420
lea eax, [esp + 0x28]
push edi
push eax
mov ecx, 0x8c77a0
call fcn.00501e30
mov ecx, dword [esp + 0x14]
dec ebp
jmp 0x5016ff
mov esi, dword [esi + 4]
cmp esi, ecx
jne 0x5016c0
mov esi, dword [esp + 0xec]
lea ecx, [esp + 0x44]
push ecx
mov ecx, esi
call fcn.00501cd0
lea ecx, [esp + 0x48]
mov dword [esp + 0x4c], 1
mov byte [esp + 0xe4], 0
call fcn.004fbb90
mov ecx, dword [esp + 0xdc]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd8
ret