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

Disassembly:
push 0xffffffffffffffff
push 0x598740
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5fd890]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
mov eax, dword [eax + 0x7c]
sub eax, 0x10
push eax
call fcn.00404440
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x30], esi
mov dword [esp + 0x70], 0
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4055b7
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x7c], eax
mov byte [esp + 0x70], 1
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4055e6
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x70], 2
mov eax, dword [esi - 0xc]
test eax, eax
jle 0x4056c4
push 0xa
push esi
call fcn.00566c28
add esp, 8
test eax, eax
je 0x4056c4
sub eax, esi
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x4056c4
push esi
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x38]
call fcn.004028d0
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0x74], 3
call fcn.004044b0
mov byte [esp + 0x70], 2
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40566e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
push esi
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x38]
call fcn.004028a0
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x74], 4
call fcn.004044b0
mov byte [esp + 0x70], 2
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4056b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [esp + 0x20]
call fcn.00402810
mov ebx, eax
call fcn.00402bc0
jmp 0x4056d5
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x80]
call fcn.004044b0
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4056ef
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x70], 5
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40571e
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x70], 6
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x7c]
cmp dword [ecx - 0xc], 0
mov ecx, dword [eax - 0xc]
jne 0x40592d
lea edx, [esp + 0x38]
push edx
push ecx
push eax
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x38], 0xdc
jle 0x40591f
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405781
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x24], esi
mov byte [esp + 0x70], 7
mov edx, dword [esp + 0x7c]
mov eax, dword [edx - 0xc]
xor ecx, ecx
mov dword [esp + 0x2c], ecx
test eax, eax
jg 0x4057d5
lea eax, [esi - 0x10]
mov byte [esp + 0x70], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405bf7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405bf7
mov ecx, dword [esp + 0x2c]
test ecx, ecx
jl 0x405915
cmp ecx, eax
jg 0x405915
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x2c]
movzx edx, word [eax + ecx*2]
mov ebx, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [ebx + 1]
sub eax, edi
or eax, ecx
mov dword [esp + 0x28], edx
jge 0x40581a
push edi
lea ecx, [esp + 0x28]
call fcn.00402030
mov esi, dword [esp + 0x24]
mov ax, word [esp + 0x28]
mov word [esi + ebx*2], ax
test edi, edi
jl 0x405915
cmp edi, dword [esi - 8]
jg 0x405915
mov dword [esi - 0xc], edi
xor ecx, ecx
mov word [esi + edi*2], cx
mov eax, dword [esi - 0xc]
lea edx, [esp + 0x48]
push edx
push eax
mov eax, dword [ebp + 4]
push esi
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x48], 0xdc
jle 0x4058d5
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
jne 0x4057a7
mov esi, dword [esp + 0x28]
xor edx, edx
lea eax, [esp + 0x34]
mov word [esp + 0x36], dx
mov word [esp + 0x34], si
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405880
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x2c]
call fcn.00404930
xor ecx, ecx
lea eax, [esp + 0x38]
mov word [esp + 0x38], si
mov word [esp + 0x3a], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4058b1
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x20]
call fcn.00404930
mov esi, dword [esp + 0x24]
jmp 0x4058f8
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jne 0x4058ea
mov ecx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x20]
jmp 0x4058f3
mov edx, dword [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
call fcn.00406a60
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x7c]
mov eax, dword [eax - 0xc]
inc ecx
cmp ecx, eax
mov dword [esp + 0x2c], ecx
jl 0x4057d1
jmp 0x4057a7
push 0x80070057
call fcn.004020b0
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0x20]
jmp 0x405bf2
lea edx, [esp + 0x48]
push edx
push ecx
push eax
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x48], 0xdc
jle 0x405a63
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405966
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x38], esi
mov byte [esp + 0x70], 8
mov ecx, dword [esp + 0x7c]
mov eax, dword [ecx - 0xc]
mov dword [esp + 0x2c], 0
test eax, eax
jle 0x405a40
mov ecx, dword [esp + 0x2c]
test ecx, ecx
jl 0x405915
cmp ecx, eax
jg 0x405915
mov edx, dword [esp + 0x7c]
mov ebx, dword [esi - 0xc]
mov eax, ecx
movzx ecx, word [edx + eax*2]
mov eax, dword [esi - 8]
mov dword [esp + 0x34], ecx
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [ebx + 1]
sub eax, edi
or eax, ecx
jge 0x4059d9
push edi
lea ecx, [esp + 0x3c]
call fcn.00402030
mov esi, dword [esp + 0x38]
mov dx, word [esp + 0x34]
mov word [esi + ebx*2], dx
test edi, edi
jl 0x405915
cmp edi, dword [esi - 8]
jg 0x405915
mov dword [esi - 0xc], edi
xor eax, eax
mov word [esi + edi*2], ax
mov eax, dword [esi - 0xc]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x48]
push ecx
push eax
push esi
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x48], 0xdc
jg 0x405a40
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
call fcn.00406a60
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x7c]
mov eax, dword [edx - 0xc]
inc ecx
cmp ecx, eax
mov dword [esp + 0x2c], ecx
jl 0x405992
add esi, 0xfffffff0
mov byte [esp + 0x70], 6
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405a71
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x405a71
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0x20]
call fcn.004044b0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
lea edx, [esp + 0x48]
push edx
push ecx
push eax
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x48], 0xdc
jle 0x405be9
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405ab1
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x38], esi
mov byte [esp + 0x70], 9
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 0xc]
mov dword [esp + 0x2c], 0
test eax, eax
jle 0x405bc6
lea ecx, [ecx]
mov edx, dword [esp + 0x2c]
test edx, edx
jl 0x405915
cmp edx, eax
jg 0x405915
movzx eax, word [ecx + edx*2]
mov ebx, dword [esi - 0xc]
mov dword [esp + 0x34], eax
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [ebx + 1]
sub eax, edi
or eax, ecx
jge 0x405b21
push edi
lea ecx, [esp + 0x3c]
call fcn.00402030
mov esi, dword [esp + 0x38]
mov cx, word [esp + 0x34]
mov word [esi + ebx*2], cx
test edi, edi
jl 0x405915
cmp edi, dword [esi - 8]
jg 0x405915
mov dword [esi - 0xc], edi
xor edx, edx
mov word [esi + edi*2], dx
mov eax, dword [esi - 0xc]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x48]
push ecx
push eax
push esi
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [esp + 0x48], 0xdc
jg 0x405bc6
mov edx, dword [esp + 0x18]
mov ebx, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
lea edi, [ebx + 1]
sub eax, edi
or eax, ecx
jge 0x405b8b
push edi
lea ecx, [esp + 0x1c]
call fcn.00402030
mov edx, dword [esp + 0x18]
mov ax, word [esp + 0x34]
mov word [edx + ebx*2], ax
test edi, edi
jl 0x405915
cmp edi, dword [edx - 8]
jg 0x405915
mov dword [edx - 0xc], edi
xor ecx, ecx
mov word [edx + edi*2], cx
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 0xc]
inc edx
cmp edx, eax
mov dword [esp + 0x2c], edx
jl 0x405ae0
add esi, 0xfffffff0
mov byte [esp + 0x70], 6
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x405bf7
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x405bf7
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004044b0
mov edi, dword [esp + 0x18]
cmp dword [edi - 0xc], 0
mov ebx, dword [esp + 0x78]
mov esi, dword [esp + 0x1c]
mov eax, 0x3c
push 0x24
mov dword [esp + 0x4c], eax
jne 0x405ca6
cmp dword [ebx + 0x78], 0xffffffff
jne 0x405c4b
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], pe_nt_image_headers32
mov dword [esp + 0x5c], 0x4e
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, ebp
call edx
jmp 0x405dad
mov ecx, pe_nt_image_headers32
mov dword [esp + 0x54], ecx
mov dword [esp + 0x44], ecx
mov edx, 0x45
mov dword [esp + 0x58], edx
mov dword [esp + 0x40], edx
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x54], 0x33
mov dword [esp + 0x40], eax
mov dword [esp + 0x4c], 0x57
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, ebp
call edx
lea eax, [esp + 0x78]
push eax
push ebx
call fcn.00406350
mov byte [esp + 0x70], 0xa
lea ebx, [esp + 0x38]
jmp 0x405d74
cmp dword [ebx + 0x78], 0xffffffff
mov ecx, pe_nt_image_headers32
mov dword [esp + 0x3c], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x44], ecx
jne 0x405d09
mov edx, 0x45
mov dword [esp + 0x58], edx
mov dword [esp + 0x40], edx
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x54], 0x33
mov dword [esp + 0x4c], 0x57
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, ebp
call edx
mov eax, dword [edi - 0xc]
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
push 0x24
lea ecx, [esp + 0x3c]
push ecx
push eax
push edi
mov ecx, ebp
call edx
jmp 0x405dad
mov dword [esp + 0x64], ecx
mov edx, 0x4e
mov dword [esp + 0x48], edx
mov dword [esp + 0x60], edx
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x54], 0x2a
mov dword [esp + 0x5c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x6c], 0x60
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, ebp
call edx
mov eax, dword [edi - 0xc]
mov edx, dword [ebp]
mov edx, dword [edx + 0x68]
push 0x24
lea ecx, [esp + 0x3c]
push ecx
push eax
push edi
mov ecx, ebp
call edx
lea eax, [esp + 0x78]
push eax
push ebx
call fcn.00406350
mov byte [esp + 0x70], 0xb
lea ebx, [esp + 0x58]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
mov edx, dword [ebp]
push 0x24
push ebx
push ecx
push eax
mov eax, dword [edx + 0x68]
mov ecx, ebp
call eax
mov byte [esp + 0x70], 6
mov eax, dword [esp + 0x78]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405dad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
mov byte [esp + 0x70], 5
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405dce
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
add esi, 0xfffffff0
mov byte [esp + 0x70], 2
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405def
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e14
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x70], 0
mov eax, dword [esp + 0x7c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x70], 0xffffffff
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e61
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 8