Function at 0x42bb10
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
mov eax, 0x8370
call fcn.00563290
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], 0x569fb0
lea eax, [esp + 0x81]
mov ecx, 0x100
mov byte [eax + 1], 0
mov byte [eax], 0
mov byte [eax - 1], 0
add eax, 3
dec ecx
jne 0x42bb38
mov eax, dword [esp + 0x8384]
cmp eax, ebx
je 0x42c4e4
cmp byte [eax], 0
je 0x42c4e4
mov esi, dword [esp + 0x8388]
cmp esi, 1
jl 0x42c4e4
mov edx, dword [esp + 0x838c]
cmp edx, 1
jl 0x42c4e4
cmp dword [esp + 0x8390], ebx
je 0x42c4e4
mov ecx, 0xc0
or eax, 0xffffffff
lea edi, [esp + 0x80]
mov dword [esp + 0x24], 2
rep stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x28], ebx
mov word [esp + 0x83], ax
mov byte [esp + 0x85], al
mov eax, esi
imul eax, edx
mov dword [esp + 0x74], eax
lea esi, [eax + 0x80]
push esi
mov dword [esp + 0x50], esi
call fcn.004c2e90
add esp, 4
cmp eax, ebx
mov dword [esp + 0x3c], eax
je 0x42c4e4
mov edi, dword [esp + 0x3c]
mov ecx, esi
mov edx, ecx
mov esi, dword [esp + 0x8390]
xor eax, eax
xor ebx, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor edx, edx
and ecx, 3
mov ebp, 2
rep stosb byte es:[edi], al
mov bx, word [esi + 0xe]
mov dword [esp + 0x380], 0xffffff
shr ebx, 3
mov ecx, ebx
mov dword [esp + 0x384], edx
imul ecx, dword [esp + 0x8388]
mov eax, ecx
mov dword [esp + 0x388], edx
and eax, reloc.WS2_32.dll_closesocket
mov dword [esp + 0x38c], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], ecx
jns 0x42bc55
dec eax
or eax, 0xfffffffc
inc eax
cmp eax, edx
jle 0x42bc66
mov edi, 4
sub edi, eax
add ecx, edi
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x838c]
mov dword [esp + 0x1c], edx
cmp eax, edx
jle 0x42be14
add esi, 0x28
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x8388]
mov esi, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x14], 0
jle 0x42bd56
lea edi, [esp + ebp*8 + 0x384]
cmp ebx, 2
je 0x42bcc6
jle 0x42bcbc
cmp ebx, 4
jg 0x42bcbc
mov al, byte [esi + 2]
mov cl, byte [esi + 1]
mov byte [esp + 0x10], al
mov al, byte [esi]
jmp 0x42bce8
xor al, al
xor cl, cl
mov byte [esp + 0x10], cl
jmp 0x42bce8
mov ax, word [esi]
mov ecx, eax
shr ecx, 0xa
and cl, 0x1f
shl cl, 3
mov byte [esp + 0x10], cl
mov ecx, eax
shr ecx, 5
and cl, 0x1f
and al, 0x1f
shl cl, 3
shl al, 3
xor edx, edx
mov dh, al
mov eax, dword [esp + 0x10]
mov dl, cl
and eax, 0xff
shl edx, 8
lea ecx, [esp + 0x380]
or edx, eax
test ecx, ecx
je 0x42bd3c
test ebp, ebp
jl 0x42bd3c
xor eax, eax
test ebp, ebp
jle 0x42bd28
lea ecx, [esp + 0x380]
cmp dword [ecx], edx
je 0x42be98
inc eax
add ecx, 8
cmp eax, ebp
jl 0x42bd18
mov dword [edi - 4], edx
mov dword [edi], 1
inc ebp
add edi, 8
cmp eax, 0xfff
jge 0x42bd56
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x8388]
add esi, ebx
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x42bca2
cmp ebp, 0xfff
jge 0x42bd84
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x838c]
inc eax
add esi, edx
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
jl 0x42bc80
cmp ebp, 0x100
mov dword [esp + 0x20], ebp
jle 0x42be14
push 0x42c500
add ebp, 0xfffffffe
push 8
lea eax, [esp + 0x398]
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_qsort]
push 0x408
call fcn.004c2e90
mov esi, eax
add esp, 0x14
test esi, esi
je 0x42be14
mov edi, 0x100
mov word [esi], 0x300
mov word [esi + 2], di
lea ecx, [esp + 0x380]
lea eax, [esi + 5]
mov dl, byte [ecx]
add ecx, 8
mov byte [eax - 1], dl
xor edx, edx
mov dl, byte [ecx - 7]
mov byte [eax], dl
mov edx, dword [ecx - 8]
shr edx, 0x10
mov byte [eax + 1], dl
mov byte [eax + 2], 0
add eax, 4
dec edi
jne 0x42bdd8
push esi
call dword [sym.imp.GDI32.dll_CreatePalette]
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CGdiObject::Attach
push esi
call fcn.004c2eb0
add esp, 4
mov eax, dword [esp + 0x838c]
mov dword [esp + 0x40], 0
dec eax
test eax, eax
mov dword [esp + 0x1c], eax
jl 0x42bfce
mov edx, dword [esp + 0x18]
mov esi, eax
mov ecx, edx
neg ecx
imul esi, edx
mov edx, dword [esp + 0x8390]
mov dword [esp + 0x50], ecx
lea ebp, [esi + edx + 0x28]
mov dword [esp + 0x18], ebp
mov edx, dword [esp + 0x8388]
mov dword [esp + 0x14], 0
test edx, edx
jle 0x42bfb7
mov eax, dword [esp + 0x24]
lea ecx, [esp + eax + 0x81]
lea ebx, [ecx + eax*2]
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x2c]
cmp eax, 2
je 0x42beb0
jle 0x42bea4
cmp eax, 4
jg 0x42bea4
mov dl, byte [ebp + 2]
mov al, byte [ebp + 1]
mov cl, byte [ebp]
mov byte [esp + 0x10], dl
jmp 0x42bed3
inc dword [esp + eax*8 + 0x384]
jmp 0x42bd35
xor cl, cl
xor al, al
xor dl, dl
mov byte [esp + 0x10], dl
jmp 0x42bed3
mov cx, word [ebp]
mov edx, ecx
mov eax, ecx
shr edx, 0xa
shr eax, 5
and dl, 0x1f
and al, 0x1f
shl dl, 3
and cl, 0x1f
mov byte [esp + 0x10], dl
shl al, 3
shl cl, 3
cmp dword [esp + 0x20], 0x100
jle 0x42bf22
xor edx, edx
mov dh, cl
mov ecx, dword [esp + 0x34]
mov dl, al
mov eax, dword [esp + 0x10]
shl edx, 8
and eax, 0xff
or edx, eax
push edx
push ecx
call dword [sym.imp.GDI32.dll_GetNearestPaletteIndex]
lea edx, [esp + 0x38]
push edx
push 1
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
test eax, eax
je 0x42c000
mov edx, dword [esp + 0x38]
mov cl, byte [esp + 0x3a]
mov al, dh
mov esi, dword [esp + 0x24]
xor edi, edi
test esi, esi
jle 0x42bf5d
lea esi, [esp + 0x81]
cmp byte [esi - 1], dl
jne 0x42bf41
cmp byte [esi], al
jne 0x42bf41
cmp byte [esi + 1], cl
je 0x42bf4d
inc edi
add esi, 3
cmp edi, dword [esp + 0x24]
jl 0x42bf33
jmp 0x42bf55
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x28], edi
cmp edi, 0x100
jge 0x42bf7d
mov esi, dword [esp + 0x24]
cmp edi, esi
jne 0x42bf7d
mov byte [ebx - 1], dl
mov byte [ebx], al
mov dword [esp + 0x28], esi
mov byte [ebx + 1], cl
inc esi
add ebx, 3
mov dword [esp + 0x24], esi
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov dl, byte [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov byte [eax + ecx], dl
mov ecx, dword [esp + 0x8388]
inc eax
add ebp, esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x42be79
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
dec eax
add ebp, ecx
mov dword [esp + 0x1c], eax
test eax, eax
mov dword [esp + 0x18], ebp
jge 0x42be50
mov ecx, dword [esp + 0x8384]
push 0x581698
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x50], edi
jne 0x42c012
mov edx, dword [esp + 0x3c]
push edx
call fcn.004c2eb0
add esp, 4
jmp 0x42c4e4
mov eax, dword [esp + 0x3c]
push eax
call fcn.004c2eb0
add esp, 4
jmp 0x42c4e4
mov ecx, dword [str.GIF89a]
xor eax, eax
mov dword [esp + 0x64], eax
mov dx, word [0x583074]
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], ecx
mov cx, word [esp + 0x838c]
mov dword [esp + 0x6c], eax
mov byte [esp + 0x70], al
mov ax, word [esp + 0x8388]
mov word [esp + 0x6a], ax
mov word [esp + 0x6c], cx
mov ecx, dword [esp + 0x24]
mov eax, 0x1f
cmp ecx, eax
mov word [esp + 0x68], dx
jge 0x42c065
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
xor ebx, ebx
lea ecx, [ebx + 1]
mov edx, 1
shl edx, cl
cmp eax, edx
jle 0x42c080
mov ebx, ecx
cmp ebx, 7
jl 0x42c06b
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
mov al, bl
or al, 0xf8
push edi
shl al, 4
push 1
lea ecx, [esp + 0x6c]
or al, bl
push 0xd
push ecx
mov byte [esp + 0x7e], al
call ebp
lea esi, [ebx + 1]
mov eax, 1
mov ecx, esi
push edi
shl eax, cl
push 1
lea edx, [eax + eax*2]
lea eax, [esp + 0x98]
push edx
push eax
call ebp
xor ecx, ecx
mov dx, word [esp + 0x83a8]
mov ax, word [esp + 0x83ac]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
push edi
mov word [esp + 0x84], cx
push 1
lea ecx, [esp + 0x80]
xor ebx, ebx
push 0xa
push ecx
mov byte [esp + 0x88], 0x2c
mov word [esp + 0x89], bx
mov word [esp + 0x8b], bx
mov word [esp + 0x8d], dx
mov word [esp + 0x8f], ax
call ebp
push edi
push esi
call dword [sym.imp.MSVCRT.dll_fputc]
mov edx, dword [esp + 0x84]
push edx
call fcn.004c2e90
add esp, 0x3c
cmp eax, ebx
mov dword [esp + 0x38], eax
je 0x42c4c7
mov ebp, 1
mov ecx, esi
shl ebp, cl
xor edi, edi
push 0x4000
mov dword [esp + 0x48], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x44], edi
lea eax, [ebp + 1]
mov dword [esp + 0x50], eax
inc eax
inc esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x80], esi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x20], esi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x42c4b6
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0x1000
mov ecx, dword [esp + 0x24]
lea eax, [ecx + ecx]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
mov eax, dword [esp + 0x2c]
add esp, 4
test edx, edx
mov dword [eax], edx
je 0x42c1d2
mov ecx, dword [esp + 0x24]
mov edi, edx
add ecx, ecx
or eax, 0xffffffff
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
add ecx, 4
dec eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
jne 0x42c198
movsx eax, bp
movsx ebp, word [esp + 0x10]
cmp ebp, 7
mov dword [esp + 0x78], eax
jle 0x42c21d
mov ecx, ebp
shr ecx, 3
mov edx, ecx
neg edx
lea ebp, [ebp + edx*8]
test bl, bl
jne 0x42c213
mov dword [esp + 0x1c], esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
shr eax, 8
inc ebx
dec ecx
jne 0x42c206
mov ecx, dword [esp + 0x74]
test ecx, ecx
jle 0x42c3d7
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x18]
inc edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x3c]
mov cl, byte [ecx + edx]
mov byte [esp + 0x28], cl
mov edx, dword [esp + 0x28]
and edx, 0xff
cmp edx, dword [esp + 0x24]
jge 0x42c3d7
cmp dword [esp + 0x18], 1
jne 0x42c265
movzx di, cl
jmp 0x42c3c2
cmp di, 0x1000
jge 0x42c3d7
movsx ecx, di
mov edi, dword [esp + 0x14]
mov dword [esp + 0x54], ecx
mov edi, dword [edi + ecx*4]
mov di, word [edi + edx*2]
cmp di, 0xffff
jne 0x42c3c2
mov edi, ecx
mov ecx, ebp
shl edi, cl
or eax, edi
movsx edi, word [esp + 0x10]
add ebp, edi
mov dword [esp + 0x48], edi
cmp ebp, 7
jle 0x42c2cc
mov ecx, ebp
shr ecx, 3
mov edi, ecx
neg edi
lea ebp, [ebp + edi*8]
test bl, bl
jne 0x42c2be
mov dword [esp + 0x1c], esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
shr eax, 8
inc ebx
dec ecx
jne 0x42c2b1
mov edi, dword [esp + 0x48]
cmp word [esp + 0x20], 0x1000
jne 0x42c385
mov edx, dword [esp + 0x78]
mov ecx, ebp
shl edx, cl
add ebp, edi
mov dword [esp + 0x48], ebp
or eax, edx
cmp ebp, 7
mov dword [esp + 0x54], eax
jle 0x42c31e
mov ecx, ebp
shr ecx, 3
mov edx, ecx
neg edx
lea edx, [ebp + edx*8]
mov dword [esp + 0x48], edx
test bl, bl
jne 0x42c310
mov dword [esp + 0x1c], esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
shr eax, 8
inc ebx
dec ecx
jne 0x42c303
mov dword [esp + 0x54], eax
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x2c], 0x1000
mov eax, dword [esp + 0x24]
mov edi, dword [ebp]
add ebp, 4
lea ecx, [eax + eax]
or eax, 0xffffffff
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x42c32a
movzx dx, byte [esp + 0x28]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x7c]
mov ebp, dword [esp + 0x48]
inc eax
mov word [esp + 0x40], dx
mov dword [esp + 0x20], eax
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], 1
jmp 0x42c3c2
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x54]
mov ecx, dword [ecx + edi*4]
mov edi, dword [esp + 0x20]
mov word [ecx + edx*2], di
mov ecx, dword [esp + 0x48]
mov edx, 1
shl edx, cl
movsx ecx, di
dec edx
inc edi
cmp ecx, edx
mov dword [esp + 0x20], edi
jle 0x42c3b4
inc dword [esp + 0x10]
movzx di, byte [esp + 0x28]
mov dword [esp + 0x18], 1
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x74]
inc ecx
cmp ecx, edx
mov dword [esp + 0x44], ecx
jl 0x42c22d
movsx edx, di
mov ecx, ebp
shl edx, cl
or eax, edx
movsx edx, word [esp + 0x10]
add ebp, edx
cmp ebp, 7
jle 0x42c410
mov ecx, ebp
shr ecx, 3
mov edi, ecx
neg edi
lea ebp, [ebp + edi*8]
test bl, bl
jne 0x42c406
mov dword [esp + 0x1c], esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
shr eax, 8
inc ebx
dec ecx
jne 0x42c3f9
movsx edi, word [esp + 0x4c]
mov ecx, ebp
add ebp, edx
shl edi, cl
or eax, edi
cmp ebp, 7
jle 0x42c44a
mov ecx, ebp
shr ecx, 3
mov edx, ecx
neg edx
lea ebp, [ebp + edx*8]
mov edx, dword [esp + 0x1c]
test bl, bl
jne 0x42c43e
mov edx, esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
shr eax, 8
inc ebx
dec ecx
jne 0x42c433
jmp 0x42c44e
mov edx, dword [esp + 0x1c]
test ebp, ebp
jle 0x42c461
test bl, bl
jne 0x42c45d
mov edx, esi
mov byte [esi], 0xff
inc esi
inc ebx
mov byte [esi], al
inc esi
inc ebx
mov ebp, dword [sym.imp.MSVCRT.dll_free]
mov al, bl
dec al
inc ebx
mov byte [edx], al
mov byte [esi], 0
mov esi, dword [esp + 0x14]
mov edi, 0x1000
mov eax, dword [esi]
test eax, eax
je 0x42c48c
push eax
call ebp
add esp, 4
mov dword [esi], 0
add esi, 4
dec edi
jne 0x42c47a
mov ecx, dword [esp + 0x14]
push ecx
call ebp
add esp, 4
test ebx, ebx
jle 0x42c4b6
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x38]
push edx
push 1
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov ecx, dword [esp + 0x38]
push ecx
call fcn.004c2eb0
mov edi, dword [esp + 0x54]
add esp, 4
push edi
push 0x3b
call dword [sym.imp.MSVCRT.dll_fputc]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [esp + 0x48]
push edx
call fcn.004c2eb0
add esp, 0x10
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0x565318
call sub.MFC42.DLL_CGdiObject::DeleteObject
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8370
ret