Function at 0x478878
Capabilities:
Allocate thread local storage
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 4], edi
mov dword [ebp - 8], esi
mov eax, dword [0x4caf60]
cmp eax, 1
je 0x47924f
mov eax, dword [0x4cab88]
test eax, eax
je 0x4788bb
mov dword [0x44d4c7c], 0x10
mov dword [0x44d4c80], 0x20
mov dword [0x44d4b04], 0
jmp 0x4788cf
mov dword [0x44d4c7c], 8
mov dword [0x44d4c80], 0x10
mov dword [0x44d4c44], 3
mov dword [0x44d4c50], 0x28
push str.Graphic
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Graphic
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478901
push str.Graphic
mov dword [0x44d4c40], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Graphic
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478933
push str.CHILDICON
mov dword [0x44d4c48], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.CHILDICON
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478965
push str.Help_not_available_for_menu_item
mov dword [0x44d4c4c], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Help_not_available_for_menu_item
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478997
push str.FullWnd
mov dword [0x44d4c54], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.FullWnd
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x4789c9
push str._Closed
mov dword [0x44d4c58], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str._Closed
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x4789fb
push str.Mark_Text__
mov dword [0x44d4c64], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Mark_Text__
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478a2d
push str.Input_pending_in
mov dword [0x44d4c6c], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Input_pending_in
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478a5f
push str.Mark_Graphics__
mov dword [0x44d4c5c], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Mark_Graphics__
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478a91
push str.Paste_input_pending
mov dword [0x44d4c70], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Paste_input_pending
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478ac3
push str.Mouse_input_pending_in
mov dword [0x44d4c60], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Mouse_input_pending_in
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478af5
push str.Select_Text__
mov dword [0x44d4c68], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Select_Text__
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478b27
push str.Select_Graphics_in
mov dword [0x44d4c74], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Select_graphics_in
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478b59
push str.Error__Printing_Aborted
mov dword [0x44d4c78], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Error__Printing_Aborted
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478b8b
push str.Error__Loading_printer_driver
mov dword [0x44d4c00], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Error__Loading_printer_driver
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478bbd
push str.No_Default_Printer
mov dword [0x44d4c04], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.No_Default_Printer
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478bef
push str.No_printer_driver
mov dword [0x44d4c08], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.No_Printer_Driver
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478c21
push str.Print_:_Printing_Error
mov dword [0x44d4c0c], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Print:_Printing_Error
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478c53
push str.Cancel
mov dword [0x44d4c10], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Cancel
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478c85
push str.Printing_In_Progress...
mov dword [0x44d4c14], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Printing_In_Progress...
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478cb7
push str.Printing
mov dword [0x44d4c18], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Printing
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478ce9
push str.Error__Loading_printer_driver
mov dword [0x44d4c1c], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Error__Loading_printer_driver
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478d1b
push str.Print:_Internal_Error
mov dword [0x44d4c20], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.0048b682
pop ecx
mov ecx, eax
mov esi, ecx
mov edi, str.Print:_Internal_Error
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478d4d
mov dword [0x4caf60], 1
mov dword [0x44d4c24], ecx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x4caff8], eax
cmp eax, 0xffffffff
jne 0x478d99
push 0xf4
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push 0x18
call fcn.0048b682
pop ecx
mov dword [0x4cb000], eax
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4787c4
call fcn.0046ba40
pop ecx
test eax, eax
je 0x479236
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x4cb004], eax
call fcn.0046ba1c
mov dword [0x4caf9c], eax
test eax, eax
je 0x47921d
call fcn.0046ba10
mov dword [0x4cafa0], eax
test eax, eax
je 0x479204
call fcn.0046ba34
mov dword [0x4cafa4], eax
test eax, eax
je 0x4791e6
mov ecx, eax
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x478e1c
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x478e05
add eax, 0xffffffff
mov ecx, dword [0x44d4c48]
mov esi, eax
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x478e3d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x478e26
add eax, 0xffffffff
lea edx, [esi + eax + 1]
push edx
call fcn.0048b682
pop ecx
mov dword [0x4caf84], eax
test eax, eax
je 0x4791cd
mov edi, dword [0x4cafa4]
mov esi, eax
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x478e5d
mov edi, dword [0x4caf84]
mov edx, dword [0x44d4c48]
mov ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov al, byte [edx]
add edx, 1
mov byte [edi], al
add edi, 1
test al, al
jne 0x478e83
call fcn.0046ba28
push dword [0x44d4c4c]
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov esi, eax
mov dword [ebp - 0x58], 0x2b
mov dword [ebp - 0x54], 0x479630
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 4
call fcn.0046ba28
mov edx, dword [0x4caf84]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], esi
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
lea ecx, [ebp - 0x58]
push ecx
call dword [sym.imp.USER32.dll_RegisterClassA]
movzx eax, ax
test eax, eax
je 0x4791cd
mov eax, dword [0x4cdb2c]
test eax, eax
jne 0x478f0b
mov eax, dword [0x4caf68]
test eax, eax
je 0x479115
push dword [0x4caf9c]
xor eax, eax
mov dword [0x4caff0], eax
mov dword [0x4cb428], eax
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
test esi, esi
je 0x4791b4
push 0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x4caf88], eax
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x4caf8c], eax
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [0x4caf94], eax
mov word [0x4cb01a], ax
push 0xe
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [0x4caf94]
imul ecx, eax
cmp ecx, 0x1e
mov dword [0x4caf98], eax
jle 0x478f83
mov dword [0x4caf90], 0x7fffffff
jmp 0x478f8f
mov eax, 1
shl eax, cl
mov dword [0x4caf90], eax
push esi
push dword [0x4caf9c]
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [0x4caf90]
cmp eax, 0x100
jle 0x478fc6
mov ecx, dword [0x4caf98]
mov dword [0x4caf90], 0x100
xor edx, edx
mov eax, 8
idiv ecx
mov dword [0x4caf94], eax
mov eax, dword [0x44d4c50]
shl eax, 2
push eax
call fcn.0048b682
pop ecx
mov dword [0x4caf64], eax
test eax, eax
je 0x47919b
mov eax, dword [0x44d4c50]
test eax, eax
jle 0x479005
xor eax, eax
mov edx, dword [0x4caf64]
mov dword [edx + eax*4], 0
add eax, 1
cmp eax, dword [0x44d4c50]
jl 0x478fed
call fcn.00472580
mov esi, eax
test esi, esi
je 0x479182
mov eax, dword [0x4cab88]
test eax, eax
jne 0x479176
mov ecx, dword [0x4cafa4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x479040
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x479029
add eax, 0xffffffff
mov ecx, dword [0x44d4c58]
mov esi, eax
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x479061
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x47904a
add eax, 0xffffffff
lea edx, [esi + eax + 1]
push edx
call fcn.0048b682
pop ecx
mov dword [0x4cafac], eax
test eax, eax
je 0x479160
mov edi, dword [0x4cafa4]
mov esi, eax
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x479081
mov edi, dword [0x4cafac]
mov edx, dword [0x44d4c58]
mov ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov al, byte [edx]
add edx, 1
mov byte [edi], al
add edi, 1
test al, al
jne 0x4790a7
mov dword [ebp - 0x30], 0x28
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0x47f4c8
mov dword [ebp - 0x24], eax
call fcn.0046ba28
mov dword [ebp - 0x20], eax
push 4
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
mov eax, dword [0x4cafac]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.USER32.dll_RegisterClassA]
movzx eax, ax
test eax, eax
je 0x479160
call fcn.0046bb38
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.USER32.dll_CreateMenu]
mov dword [0x4caf68], eax
test eax, eax
je 0x47914a
call fcn.004806c0
test eax, eax
jne 0x478f0b
push 0x137
push str.qwginit.c
push 7
call fcn.004751b8
add esp, 0xc
jmp 0x478f0b
push 0x131
push str.qwginit.c
push 5
call fcn.004751b8
add esp, 0xc
jmp 0x479124
push 0x16c
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x479106
push esi
call fcn.0046ffcc
pop ecx
jmp 0x479021
push 0x162
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x479014
push 0x155
push str.qwginit.c
push 5
call fcn.004751b8
add esp, 0xc
jmp 0x478fe2
push 0x210
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x478f2d
push 0x124
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x478ef5
push 0x116
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
mov eax, dword [0x4cafa4]
jmp 0x478e01
push 0x110
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x478def
push 0x10a
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x478ddd
push 0x101
push str.qwginit.c
push 5
call fcn.00475230
add esp, 0xc
jmp 0x478dc0
push 0x76
push str.qwginit.c
push 6
call fcn.00475140
add esp, 0xc
mov esp, ebp
pop ebp
ret