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

Disassembly:
push 0xffffffffffffffff
push 0x40801b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5d4
mov ax, word [0x40b93c]
push ebx
mov ebx, dword [ecx + 0xdc]
push ebp
xor ebp, ebp
push esi
cmp word [ecx + 0xf4], bp
mov edx, 0xffff
push edi
mov dword [esp + 0x10], ecx
mov word [esp + 0x20], dx
mov word [esp + 0x22], ax
mov word [esp + 0x24], bp
mov word [esp + 0x26], 1
lea esi, [esp + 0x1e4]
mov word [esp + 0x14], dx
mov word [esp + 0x16], ax
mov word [esp + 0x18], bp
mov word [esp + 0x1a], 0x11
lea edi, [esp + 0x3e4]
mov dword [esp + 0x2c], ebp
jbe 0x4044b3
mov ax, word [ebx + 0xa]
cmp ax, word [ebx + 4]
jb 0x404441
cmp word [ebx], 0xffff
je 0x404441
mov word [ebx + 0xa], bp
cmp word [ebx + 6], bp
jbe 0x404446
xor ecx, ecx
lea eax, [esp + 0xa0]
mov cx, word [ebx]
push eax
add ecx, ebp
push ecx
call sub.XAPIDB.dll_GetAtValue
test ax, ax
jne 0x40442a
cmp word [ebx + 8], ax
je 0x404362
cmp word [0x40cb64], ax
jne 0x4042f2
mov eax, dword [esp + 0x123]
mov dx, word [ebx + 2]
mov ecx, dword [esp + 0x125]
and eax, 0xfff7
mov word [edi + 2], ax
mov ax, word [esp + 0x18]
add ax, 8
add dx, bp
cmp ax, 0x1e8
mov word [edi], dx
mov dword [edi + 4], ecx
mov word [esp + 0x18], ax
jb 0x4042ea
cmp word [0x40b920], 0
jne 0x404347
lea edx, [esp + 0x3e4]
lea eax, [esp + 0x14]
push edx
push eax
jmp 0x404342
add edi, 8
jmp 0x40442a
mov eax, dword [esp + 0x125]
mov edx, dword [esp + 0x123]
xor ecx, ecx
and edx, 0xfff7
mov cx, word [ebx + 2]
mov dword [edi + 4], eax
mov ax, word [esp + 0x18]
add ecx, ebp
add ax, 0xa
mov dword [edi], ecx
cmp ax, 0x1e6
mov word [edi + 8], dx
mov word [esp + 0x18], ax
jb 0x40435a
cmp word [0x40b920], 0
jne 0x404347
lea ecx, [esp + 0x3e4]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.00402df0
lea edi, [esp + 0x3e4]
mov word [esp + 0x18], 0
jmp 0x40442a
add edi, 0xa
jmp 0x40442a
cmp word [0x40cb64], 0
jne 0x4043d6
mov ax, word [ebx + 2]
mov ecx, dword [esp + 0x123]
mov edx, dword [esp + 0x125]
add ax, bp
mov word [esi], ax
mov ax, word [esp + 0x24]
add ax, 8
and ecx, 0xfff7
cmp ax, 0x1e8
mov word [esi + 2], cx
mov dword [esi + 4], edx
mov word [esp + 0x24], ax
jb 0x4043d1
cmp word [0x40b920], 0
jne 0x4043c1
lea eax, [esp + 0x1e4]
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00402df0
lea esi, [esp + 0x1e4]
mov word [esp + 0x24], 0
jmp 0x40442a
add esi, 8
jmp 0x40442a
mov eax, dword [esp + 0x123]
mov ecx, dword [esp + 0x125]
xor edx, edx
and eax, 0xfff7
mov dx, word [ebx + 2]
mov word [esi + 8], ax
mov ax, word [esp + 0x24]
add edx, ebp
add ax, 0xa
mov dword [esi], edx
cmp ax, 0x1e6
mov dword [esi + 4], ecx
mov word [esp + 0x24], ax
jb 0x404427
cmp word [0x40b920], 0
jne 0x4043c1
lea edx, [esp + 0x1e4]
lea eax, [esp + 0x20]
push edx
push eax
jmp 0x4043bc
add esi, 0xa
xor ecx, ecx
inc ebp
mov cx, word [ebx + 6]
cmp ebp, ecx
jl 0x404268
mov ecx, dword [esp + 0x10]
xor ebp, ebp
jmp 0x404446
inc eax
mov word [ebx + 0xa], ax
mov eax, dword [esp + 0x2c]
xor edx, edx
mov dx, word [ecx + 0xf4]
add ebx, 0x16
inc eax
cmp eax, edx
mov dword [esp + 0x2c], eax
jl 0x404241
cmp word [esp + 0x24], bp
je 0x40448b
cmp word [0x40b920], bp
jne 0x40448b
lea eax, [esp + 0x1e4]
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00402df0
mov ecx, dword [esp + 0x10]
xor ebp, ebp
cmp word [esp + 0x18], bp
je 0x4044b3
cmp word [0x40b920], bp
jne 0x4044b3
lea edx, [esp + 0x3e4]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.00402df0
mov ecx, dword [esp + 0x10]
xor ebp, ebp
mov dx, word [0x40b93c]
cmp word [ecx + 0xf6], bp
mov esi, dword [ecx + 0xe0]
mov word [esp + 0x24], bp
mov word [esp + 0x26], 2
lea edi, [esp + 0x1e4]
mov word [esp + 0x14], 0xffff
mov word [esp + 0x16], dx
mov word [esp + 0x18], bp
mov word [esp + 0x1a], 0x12
lea ebx, [esp + 0x3e4]
mov dword [esp + 0x2c], ebp
jbe 0x404745
mov ax, word [esi + 0xa]
cmp ax, word [esi + 4]
jb 0x4046d7
cmp word [esi], 0xffff
je 0x4046d7
xor ebp, ebp
mov word [esi + 0xa], bp
cmp word [esi + 6], bp
jbe 0x4046dc
xor ecx, ecx
lea eax, [esp + 0x148]
mov cx, word [esi]
push eax
add ecx, ebp
push ecx
call sub.XAPIDB.dll_GetDtValue
test ax, ax
jne 0x4046c6
cmp word [esi + 8], ax
je 0x404612
cmp word [0x40cb64], ax
jne 0x4045ac
mov eax, dword [esp + 0x1cb]
mov dx, word [esi + 2]
and eax, 0xfff7
add dx, bp
mov word [ebx + 2], ax
mov ax, word [esp + 0x18]
add ax, 4
mov word [ebx], dx
cmp ax, 0x1ec
mov word [esp + 0x18], ax
jb 0x4045a4
cmp word [0x40b920], 0
jne 0x4045f7
lea ecx, [esp + 0x3e4]
lea edx, [esp + 0x14]
push ecx
push edx
jmp 0x4045f2
add ebx, 4
jmp 0x4046c6
xor eax, eax
mov ecx, dword [esp + 0x1cb]
mov ax, word [esi + 2]
and ecx, 0xfff7
add eax, ebp
mov word [ebx + 4], cx
mov dword [ebx], eax
mov ax, word [esp + 0x18]
add ax, 6
cmp ax, 0x1ea
mov word [esp + 0x18], ax
jb 0x40460a
cmp word [0x40b920], 0
jne 0x4045f7
lea edx, [esp + 0x3e4]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.00402df0
lea ebx, [esp + 0x3e4]
mov word [esp + 0x18], 0
jmp 0x4046c6
add ebx, 6
jmp 0x4046c6
cmp word [0x40cb64], 0
jne 0x40467c
mov ax, word [esp + 0x24]
mov cx, word [esi + 2]
mov edx, dword [esp + 0x1cb]
add ax, 4
add cx, bp
and edx, 0xfff7
cmp ax, 0x1ec
mov word [edi], cx
mov word [edi + 2], dx
mov word [esp + 0x24], ax
jb 0x404677
cmp word [0x40b920], 0
jne 0x404667
lea eax, [esp + 0x1e4]
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00402df0
lea edi, [esp + 0x1e4]
mov word [esp + 0x24], 0
jmp 0x4046c6
add edi, 4
jmp 0x4046c6
mov eax, dword [esp + 0x1cb]
xor edx, edx
mov dx, word [esi + 2]
and eax, 0xfff7
mov word [edi + 4], ax
mov ax, word [esp + 0x24]
add ax, 6
add edx, ebp
cmp ax, 0x1ea
mov dword [edi], edx
mov word [esp + 0x24], ax
jb 0x4046c3
cmp word [0x40b920], 0
jne 0x404667
lea ecx, [esp + 0x1e4]
lea edx, [esp + 0x20]
push ecx
push edx
jmp 0x404662
add edi, 6
xor eax, eax
inc ebp
mov ax, word [esi + 6]
cmp ebp, eax
jl 0x40452c
jmp 0x4046dc
inc eax
mov word [esi + 0xa], ax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
xor ecx, ecx
add esi, 0x16
mov cx, word [edx + 0xf6]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x404503
cmp word [esp + 0x24], 0
je 0x404721
cmp word [0x40b920], 0
jne 0x404721
lea eax, [esp + 0x1e4]
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00402df0
cmp word [esp + 0x18], 0
je 0x404745
cmp word [0x40b920], 0
jne 0x404745
lea edx, [esp + 0x3e4]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.00402df0
xor ebx, ebx
push 1
mov word [esp + 0x28], bx
mov word [esp + 0x2a], 0x1001
mov word [esp + 0x1c], bx
mov word [esp + 0x1e], 0x1002
call sub.XAPINET.dll_GetQueueTail
mov esi, dword [esp + 0x10]
mov edi, eax
xor ecx, ecx
mov ax, word [esi + 0xd8]
cmp di, ax
je 0x404a22
jmp 0x404784
mov ecx, dword [esp + 0x10]
inc ecx
cmp cx, word [esi + 0xda]
mov dword [esp + 0x10], ecx
ja 0x4049d9
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x50]
push ecx
push edx
push eax
push 1
call sub.XAPINET.dll_GetQueueData
mov ecx, eax
mov ax, word [esi + 0xd8]
inc ax
xor ebp, ebp
mov bp, word [esi + 0xda]
and eax, 0xffff
cdq
idiv ebp
mov word [esi + 0xd8], dx
cmp word [0x40b920], bx
jne 0x4049c7
cmp ecx, ebx
je 0x4049c7
mov ax, word [esp + 0x5e]
cmp ax, 0x1001
jne 0x4048d1
cmp dword [0x40b904], ebx
je 0x4049c7
cmp word [0x40cb64], bx
mov eax, 0x24
jne 0x404890
mov ax, word [esp + 0x70]
mov cx, word [esp + 0x74]
mov dx, word [esp + 0x76]
mov word [esp + 0x30], ax
mov ax, word [esp + 0x80]
mov word [esp + 0x32], cx
mov ecx, dword [esp + 0x78]
mov word [esp + 0x36], ax
mov al, byte [esp + 0x82]
mov word [esp + 0x34], dx
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x38], ecx
mov cl, byte [esp + 0x83]
mov byte [esp + 0x40], al
mov eax, dword [esp + 0x34]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x30]
mov byte [esp + 0x41], cl
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x74], eax
mov ax, word [esp + 0x40]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x3c]
mov word [esp + 0x80], ax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov eax, 0x22
lea ecx, [esp + 0x60]
push 1
push ecx
lea edx, [esp + 0x1ec]
lea ecx, [esp + 0x28]
push edx
mov dx, word [esi + 0xf4]
push ecx
mov ecx, dword [esi + 0xdc]
push edx
mov edx, dword [esp + 0x84]
push ecx
lea ecx, [esp + 0x88]
push edx
push ecx
push eax
call fcn.004040a0
add esp, 0x24
jmp 0x4049c7
cmp ax, 0x1002
jne 0x404963
cmp dword [0x40b904], ebx
je 0x4049c7
cmp word [0x40cb64], bx
jne 0x404924
mov dx, word [esp + 0x70]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov word [esp + 0x44], dx
mov dword [esp + 0x46], eax
mov edx, dword [esp + 0x44]
mov dword [esp + 0x4a], ecx
mov eax, dword [esp + 0x48]
mov cx, word [esp + 0x4c]
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], eax
mov word [esp + 0x78], cx
lea edx, [esp + 0x60]
push 1
lea eax, [esp + 0x3e8]
push edx
mov dx, word [esi + 0xf6]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esi + 0xe0]
push ecx
mov ecx, dword [esp + 0x80]
push edx
push eax
lea edx, [esp + 0x88]
push ecx
push edx
push 0x1c
call fcn.004040a0
add esp, 0x24
jmp 0x4049c7
cmp ax, 0x2011
jne 0x4049c7
mov ax, word [0x40b024]
mov ecx, dword [0x40b8fc]
push eax
push ecx
mov ecx, esi
call fcn.004060f0
test eax, eax
je 0x4049c7
mov ax, word [esp + 0x70]
cmp ax, word [0x40b8fa]
je 0x404999
cmp ax, word [0x40b8f8]
jne 0x4049c7
mov dx, word [esp + 0x5c]
mov word [esp + 0x50], ax
lea eax, [esp + 0x72]
lea ecx, [esp + 0x50]
push eax
push ecx
mov ecx, esi
mov word [esp + 0x5c], 0x2e
mov word [esp + 0x5a], dx
mov word [esp + 0x5e], 0x2011
call fcn.00405c40
mov ax, word [esi + 0xd8]
cmp di, ax
jne 0x404780
jmp 0x404a22
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
and edi, 0xffff
lea edx, [esp + 0x10]
push edi
push str.xd_Alm_tail___d
push edx
mov dword [esp + 0x5f8], ebx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
add esp, 0xc
push ebx
push ebx
push eax
call sub.MFC42.DLL_AfxMessageBox_1
lea ecx, [esp + 0x10]
mov dword [esp + 0x5ec], 0xffffffff
call fcn.00407b72
cmp word [0x40b920], bx
jne 0x404a5d
cmp word [esp + 0x24], bx
je 0x404a44
lea ecx, [esp + 0x1e4]
lea edx, [esp + 0x20]
push ecx
push edx
call fcn.00402df0
cmp word [esp + 0x18], bx
je 0x404a5d
lea eax, [esp + 0x3e4]
lea ecx, [esp + 0x14]
push eax
push ecx
call fcn.00402df0
mov ecx, dword [esp + 0x5e4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5e0
ret