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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x1c
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ecx
mov dword [esp + 4], 0xa4
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
test eax, eax
je 0x402bc2
mov edi, dword [0x413088]
mov dword [eax], 0x413080
mov ebx, eax
mov dword [eax + 4], esi
mov dword [eax + 8], 3
mov dword [eax + 0x14], 0x19
mov dword [eax + 0x18], 1
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
test edi, edi
je 0x402d00
mov eax, dword [edi + 0x28]
mov dword [ebx + 0x28], eax
mov eax, dword [edi + 0x2c]
mov dword [ebx + 0x2c], eax
mov eax, dword [edi + 0x7c]
sub eax, dword [edi + 0x74]
mov dword [ebx + 0x7c], eax
mov eax, dword [edi + 0x80]
sub eax, dword [edi + 0x78]
mov dword [ebx + 0x80], eax
movzx eax, word [edi + 0x24]
mov word [ebx + 0x24], ax
mov word [ebx + 0x26], ax
mov eax, dword [edi + 0x84]
mov dword [ebx + 0x84], eax
mov eax, dword [edi + 0x88]
mov dword [ebx + 0x88], eax
mov eax, dword [edi + 0x8c]
mov dword [ebx + 0x8c], eax
mov eax, dword [edi + 0x90]
mov dword [ebx + 0x90], eax
mov ecx, dword [edi + 0x34]
mov dword [ebx + 0x34], ecx
mov ecx, dword [edi + 0x38]
mov dword [ebx + 0x38], ecx
mov ecx, dword [edi + 0x3c]
mov dword [ebx + 0x3c], ecx
mov ecx, dword [edi + 0x40]
mov dword [ebx + 0x40], ecx
mov ecx, dword [edi + 0x44]
mov dword [ebx + 0x44], ecx
mov ecx, dword [edi + 0x48]
mov dword [ebx + 0x48], ecx
mov ecx, dword [edi + 0x4c]
mov eax, dword [ebx + 0x90]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [edi + 0x50]
mov dword [ebx + 0x50], ecx
mov ecx, dword [edi + 0x54]
mov dword [ebx + 0x54], ecx
mov ecx, dword [edi + 0x58]
mov dword [ebx + 0x58], ecx
mov ecx, dword [edi + 0x5c]
mov dword [ebx + 0x5c], ecx
mov ecx, dword [edi + 0x60]
mov dword [ebx + 0x60], ecx
mov ecx, dword [edi + 0x64]
mov dword [ebx + 0x64], ecx
mov ecx, dword [edi + 0x68]
mov dword [ebx + 0x68], ecx
mov ecx, dword [edi + 0x6c]
mov dword [ebx + 0x6c], ecx
mov edx, dword [edi + 0x70]
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x402d30
mov edi, dword [0x4142e4]
test edi, edi
jne 0x402b9b
jmp 0x402bce
lea ecx, [edi + 4]
lea edx, [edi + 8]
mov eax, ecx
cmovns eax, edx
mov edx, dword [eax]
test edx, edx
je 0x402bd8
mov edi, edx
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [0x4142e0]
test eax, eax
jne 0x402b88
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
test byte [0x413024], 2
jne 0x402d70
xor ebx, ebx
add esp, 0x1c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x4142e4
lea esi, [esi]
nop
lea edx, [ebx + 0x94]
mov dword [ebx + 0x94], edi
mov dword [ebx + 0xa0], 1
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x9c], 0
mov dword [eax], edx
mov eax, dword [ebx + 0x94]
mov dword [ebp - 0x10], edx
test eax, eax
je 0x402c1b
test byte [eax + 0xc], 1
jne 0x402cb0
mov eax, dword [0x4142e4]
and dword [eax + 0xc], 0xfffffffe
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 0x10]
mov eax, esi
imul eax, edi
shl eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebx + 0x30], eax
mov ecx, eax
test eax, eax
je 0x402eba
xor eax, eax
test esi, esi
jne 0x402c53
jmp 0x402c63
mov ecx, dword [ebx + 0x30]
mov dword [ecx + eax*4], 0x70020
inc eax
cmp eax, dword [ebx + 0xc]
jb 0x402c50
mov edi, dword [ebx + 0x10]
cmp edi, 1
jbe 0x402bc4
mov esi, 1
lea esi, [esi]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x30]
shl eax, 2
mov dword [esp + 4], ecx
mov edx, eax
mov dword [esp + 8], eax
imul edx, esi
inc esi
add edx, ecx
mov dword [esp], edx
call sym._memcpy
cmp esi, dword [ebx + 0x10]
jb 0x402c78
add esp, 0x1c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [eax]
mov ecx, dword [edi + 4]
cmp ecx, eax
je 0x402d9f
test ecx, ecx
je 0x402e18
test byte [ecx + 0xc], 1
je 0x402e18
xor dword [edi + 0xc], 1
xor dword [ecx + 0xc], 1
mov eax, dword [edi + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
mov eax, dword [edx]
test eax, eax
je 0x402c1b
test byte [eax + 0xc], 1
jne 0x402cb0
jmp 0x402c1b
mov dword [eax + 0x28], edx
dec edx
mov dword [eax + 0x2c], ecx
dec ecx
mov dword [eax + 0x7c], edx
mov dword [eax + 0x80], ecx
mov dword [eax + 0x24], 0xf50007
mov dword [eax + 0x88], 0x10190
jmp 0x402b76
lea edx, [eax + eax]
mov dword [esp], edx
mov dword [ebp - 0x10], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x10]
test eax, eax
mov dword [ebx + 0x8c], eax
je 0x402eee
mov ecx, dword [edi + 0x8c]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._memcpy
jmp 0x402b76
mov dword [esp + 0x10], esi
xor ebx, ebx
mov dword [esp + 0xc], str.id__x_already_exists_n
mov dword [esp + 8], str.create_screen_buffer
mov dword [esp + 4], 0x413024
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402bc4
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x402dc4
test byte [ecx + 0xc], 1
je 0x402dc4
xor dword [edi + 0xc], 1
xor dword [eax + 0xc], 1
mov eax, dword [edi + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
jmp 0x402ce2
mov ecx, dword [eax + 8]
cmp edx, ecx
je 0x402e5c
mov ecx, dword [edx]
and dword [ecx + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov edi, dword [eax]
mov ecx, dword [eax + 4]
test edi, edi
je 0x402ea7
cmp eax, dword [edi + 4]
je 0x402eb2
mov dword [edi + 8], ecx
mov edi, dword [ecx + 8]
mov dword [eax + 4], edi
test edi, edi
je 0x402e06
mov dword [edi], eax
mov dword [ecx + 8], eax
mov edi, dword [eax]
mov dword [ecx], edi
mov dword [eax], ecx
jmp 0x402ce2
mov ecx, dword [eax + 4]
cmp edx, ecx
je 0x402e88
mov ecx, dword [edx]
and dword [ecx + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov edi, dword [eax]
mov ecx, dword [eax + 8]
test edi, edi
je 0x402e7b
cmp eax, dword [edi + 4]
je 0x402e83
mov dword [edi + 8], ecx
mov edi, dword [ecx + 4]
mov dword [eax + 8], edi
test edi, edi
je 0x402e4e
mov dword [edi], eax
mov dword [ecx + 4], eax
mov edi, dword [eax]
mov dword [ecx], edi
mov dword [eax], ecx
jmp 0x402ce2
mov dword [edi + 4], ecx
mov edx, dword [ecx + 4]
mov dword [eax + 8], edx
test edx, edx
je 0x402e6b
mov dword [edx], eax
mov dword [ecx + 4], eax
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, eax
mov dword [eax], ecx
jmp 0x402dd1
mov dword [0x4142e4], ecx
jmp 0x402e42
mov dword [edi + 4], ecx
jmp 0x402e42
mov dword [edi + 8], ecx
mov edx, dword [ecx + 8]
mov dword [eax + 4], edx
test edx, edx
je 0x402e97
mov dword [edx], eax
mov dword [ecx + 8], eax
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, eax
mov dword [eax], ecx
jmp 0x402e21
mov dword [0x4142e4], ecx
jmp 0x402dfa
mov dword [edi + 4], ecx
jmp 0x402dfa
mov eax, dword [ebx]
cmp ebx, dword [eax + 8]
je 0x402efe
mov eax, dword [ebp - 0x10]
call sym._rb_remove.constprop.0
mov eax, dword [ebx + 0x8c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call esi
mov dword [esp], ebx
xor ebx, ebx
call esi
jmp 0x402bc4
mov dword [esp], ebx
xor ebx, ebx
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x402bc4
mov dword [eax + 8], 0
jmp 0x402ec1