Function at 0x4f09bc
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3d8
push ebx
xor ebx, ebx
mov dword [ebp - 0xc24], ebx
mov dword [ebp - 0xc28], ebx
mov dword [ebp - 0x410], ecx
mov dword [ebp - 0x40c], edx
mov byte [ebp - 0x405], al
mov eax, dword [ebp - 0x40c]
call fcn.004042a4
xor eax, eax
push ebp
push 0x4f19e6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x84227c]
mov eax, dword [eax]
call fcn.0042b364
mov dword [ebp - 0x4b4], eax
xor eax, eax
mov dword [ebp - 0x4b0], eax
mov eax, dword [ebp - 0x4b4]
imul dword [ebp - 0x410]
mov dword [ebp - 0x4b4], eax
lea eax, [ebp - 0xa34]
mov edx, dword [ebp - 0x40c]
call fcn.0040a094
mov eax, 0x4f19fc
mov dword [ebp - 0x480], eax
xor eax, eax
mov dword [0x843bdc], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [0x843bdc]
mov dword [eax], edx
mov eax, dword [ebp - 0x480]
push eax
lea eax, [ebp - 0xa34]
push eax
call fcn.004f4e9a
add esp, 8
mov dword [0x843bdc], eax
cmp dword [0x843bdc], 0
jne 0x4f0a8a
xor eax, eax
mov dword [ebp - 0x414], eax
jmp 0x4f19bd
mov eax, dword [ebp + 0x10]
mov edx, dword [0x843bdc]
mov dword [eax], edx
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x4b6]
push eax
push 0x103
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
cmp byte [ebp - 0x405], 0
jne 0x4f0b05
cmp word [ebp - 0x4b6], 5
jne 0x4f0b05
mov eax, dword [0x843bdc]
push eax
call fcn.004f5778
pop ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 0x414], eax
push 0
mov cx, word [0x4f1a00]
mov dl, 2
mov eax, 0x4f1a0c
call fcn.0044b300
jmp 0x4f19bd
mov word [ebp - 0x44e], 0
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x44c]
push eax
push pe_nt_image_headers32
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x448]
push eax
push 0x101
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x44e]
push eax
push 0x102
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x45c]
push eax
push 0x116
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x45e]
push eax
push 0x106
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4ac]
push eax
mov eax, dword [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x4d6]
push eax
push 0x11c
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
cmp word [ebp - 0x45e], 2
jne 0x4f0c2a
mov dword [ebp - 0x414], 0x12d687
mov eax, dword [0x843bdc]
push eax
call fcn.004f5778
pop ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
jmp 0x4f19bd
cmp word [ebp - 0x45e], 0
jne 0x4f0c5d
mov ax, word [ebp - 0x44e]
dec eax
sub ax, 2
jb 0x4f0c5d
sub ax, 1
je 0x4f0c5d
sub ax, 4
je 0x4f0c5d
sub ax, 0x10
je 0x4f0c5d
mov word [ebp - 0x44e], 1
mov eax, dword [0x843bdc]
push eax
call fcn.00503a50
pop ecx
mov dword [ebp - 0x454], eax
mov eax, dword [ebp - 0x454]
cdq
idiv dword [ebp - 0x44c]
bound eax, qword [0x4f1b18]
mov word [ebp - 0x456], ax
mov dword [ebp - 0x4d0], pe_nt_image_headers32
xor eax, eax
mov dword [ebp - 0x4c0], eax
mov dword [ebp - 0x4c4], 0xff
mov byte [ebp - 0x4b7], 0
mov byte [ebp - 0x4b8], 0
mov byte [ebp - 0x4b9], 0
cmp word [ebp - 0x44e], 4
jne 0x4f0d01
mov word [ebp - 0x456], 1
mov word [ebp - 0x44e], 8
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x4cc], eax
mov eax, dword [ebp - 0x454]
add eax, eax
mov dword [ebp - 0x454], eax
mov byte [ebp - 0x4b7], 1
mov dword [ebp - 0x4d0], 0x10
cmp word [ebp - 0x44e], 1
jne 0x4f0d62
mov word [ebp - 0x456], 1
mov word [ebp - 0x44e], 8
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x4cc], eax
mov eax, dword [ebp - 0x44c]
mov dword [ebp - 0x454], eax
mov byte [ebp - 0x4b8], 1
mov dword [ebp - 0x4d0], 1
cmp word [ebp - 0x45e], 0
jne 0x4f0d62
mov dword [ebp - 0x4c0], 0xff
xor eax, eax
mov dword [ebp - 0x4c4], eax
mov eax, dword [ebp - 0x44c]
cdq
idiv dword [ebp - 0x410]
mov dword [ebp - 0x44c], eax
mov eax, dword [ebp - 0x448]
cdq
idiv dword [ebp - 0x410]
mov dword [ebp - 0x448], eax
cmp dword [ebp - 0x4b0], 0
jne 0x4f0d9d
mov eax, dword [ebp - 0x44c]
mov dword [ebp - 0x4b0], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x44c]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x448]
mov dword [eax], edx
movzx eax, word [ebp - 0x44e]
movzx edx, word [ebp - 0x456]
imul edx
bound eax, qword [0x4f1b18]
mov word [ebp - 0x47a], ax
cmp word [ebp - 0x456], 1
jbe 0x4f0e0f
push 0
mov cx, word [0x4f1b20]
mov dl, 1
mov eax, 0x4f1b2c
call fcn.0044b300
mov eax, dword [0x843bdc]
push eax
call fcn.004f5778
pop ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 0x414], eax
jmp 0x4f19bd
cmp word [ebp - 0x456], 1
jbe 0x4f0e53
mov word [ebp - 0x47a], 8
mov byte [ebp - 0x4b9], 1
mov word [ebp - 0x456], 1
mov word [ebp - 0x44e], 8
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x4cc], eax
mov eax, dword [ebp - 0x44c]
mov dword [ebp - 0x454], eax
cmp word [ebp - 0x44e], 1
jae 0x4f0e92
push 0
mov cx, word [0x4f1b20]
mov dl, 1
mov eax, 0x4f1b74
call fcn.0044b300
mov eax, dword [0x843bdc]
push eax
call fcn.004f5778
pop ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 0x414], eax
jmp 0x4f19bd
mov eax, dword [ebp - 0x454]
cdq
idiv dword [ebp - 0x410]
and eax, 0x80000003
jns 0x4f0eab
dec eax
or eax, 0xfffffffc
inc eax
mov edx, 4
sub edx, eax
mov dword [ebp - 0x46c], edx
cmp dword [ebp - 0x46c], 4
jne 0x4f0ec9
xor eax, eax
mov dword [ebp - 0x46c], eax
mov dword [ebp - 0x430], 0x28
mov eax, dword [ebp - 0x430]
add eax, 0x400
call fcn.004027d4
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x42c]
mov dword [eax], 0x28
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x4b0]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x4b4]
neg eax
mov edx, dword [ebp - 0x42c]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x42c]
mov word [eax + 0xc], 1
mov eax, dword [ebp - 0x42c]
mov dx, word [ebp - 0x47a]
mov word [eax + 0xe], dx
mov eax, dword [ebp - 0x42c]
xor edx, edx
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x4b0]
imul dword [ebp - 0x4b4]
movzx edx, word [ebp - 0x47a]
imul edx
test eax, eax
jns 0x4f0f59
add eax, 7
sar eax, 3
mov edx, dword [ebp - 0x42c]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x42c]
mov dword [eax + 0x18], 0xb12
mov eax, dword [ebp - 0x42c]
mov dword [eax + 0x1c], 0xb12
mov eax, dword [ebp - 0x42c]
xor edx, edx
mov dword [eax + 0x20], edx
mov eax, dword [ebp - 0x42c]
xor edx, edx
mov dword [eax + 0x24], edx
cmp byte [ebp - 0x4b8], 0
je 0x4f101c
mov al, byte [ebp - 0x4c0]
mov edx, dword [ebp - 0x42c]
mov byte [edx + 0x2a], al
mov al, byte [ebp - 0x4c0]
mov edx, dword [ebp - 0x42c]
mov byte [edx + 0x29], al
mov al, byte [ebp - 0x4c0]
mov edx, dword [ebp - 0x42c]
mov byte [edx + 0x28], al
mov dword [ebp - 0x484], 1
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4c4]
mov byte [eax + edx*4 + 0x2a], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4c4]
mov byte [eax + edx*4 + 0x29], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4c4]
mov byte [eax + edx*4 + 0x28], cl
jmp 0x4f1375
cmp word [ebp - 0x45e], 2
jne 0x4f1225
mov word [ebp - 0x404], 0x300
mov word [ebp - 0x402], 0xd8
mov edx, 0x4f1bbc
lea eax, [ebp - 0xc00]
call fcn.0040619e
lea eax, [ebp - 0xc00]
call fcn.004066e7
call fcn.00402898
lea eax, [ebp - 0xc00]
call fcn.00406630
call fcn.00402898
lea eax, [ebp - 0xc00]
call fcn.00406630
call fcn.00402898
lea eax, [ebp - 0xc00]
call fcn.00406630
call fcn.00402898
xor eax, eax
mov dword [ebp - 0x484], eax
lea edx, [ebp - 0xc1f]
mov ecx, 0x1e
lea eax, [ebp - 0xc00]
call fcn.00406598
lea eax, [ebp - 0xc00]
call fcn.00406630
call fcn.00402898
lea eax, [ebp - 0xc24]
push eax
lea eax, [ebp - 0xc28]
lea edx, [ebp - 0xc1f]
call fcn.00404094
mov eax, dword [ebp - 0xc28]
mov ecx, 0x4f1bcc
mov edx, 1
call fcn.0044c510
mov eax, dword [ebp - 0xc24]
call fcn.00409514
mov byte [ebp - 0x4d1], al
lea eax, [ebp - 0xc24]
push eax
lea eax, [ebp - 0xc28]
lea edx, [ebp - 0xc1f]
call fcn.00404094
mov eax, dword [ebp - 0xc28]
mov ecx, 0x4f1bcc
mov edx, 2
call fcn.0044c510
mov eax, dword [ebp - 0xc24]
call fcn.00409514
mov byte [ebp - 0x4d2], al
lea eax, [ebp - 0xc24]
push eax
lea eax, [ebp - 0xc28]
lea edx, [ebp - 0xc1f]
call fcn.00404094
mov eax, dword [ebp - 0xc28]
mov ecx, 0x4f1bcc
mov edx, 3
call fcn.0044c510
mov eax, dword [ebp - 0xc24]
call fcn.00409514
mov byte [ebp - 0x4d3], al
mov eax, dword [ebp - 0x484]
mov dl, byte [ebp - 0x4d3]
mov byte [ebp + eax*4 - 0x400], dl
mov eax, dword [ebp - 0x484]
mov dl, byte [ebp - 0x4d2]
mov byte [ebp + eax*4 - 0x3ff], dl
mov eax, dword [ebp - 0x484]
mov dl, byte [ebp - 0x4d1]
mov byte [ebp + eax*4 - 0x3fe], dl
mov eax, dword [ebp - 0x484]
mov byte [ebp + eax*4 - 0x3fd], 0
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4d3]
mov byte [eax + edx*4 + 0x2a], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4d2]
mov byte [eax + edx*4 + 0x29], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x4d1]
mov byte [eax + edx*4 + 0x28], cl
inc dword [ebp - 0x484]
cmp dword [ebp - 0x484], 0x100
jne 0x4f1094
lea eax, [ebp - 0x404]
push eax
call sub.GDI32.DLL_CreatePalette
mov dword [ebp - 0x440], eax
cmp word [ebp - 0x45e], 3
jne 0x4f12f5
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x474]
push eax
lea eax, [ebp - 0x470]
push eax
push 0x140
mov eax, dword [0x843bdc]
push eax
call fcn.004f7432
add esp, 0x14
mov eax, dword [ebp - 0x4d0]
dec eax
test eax, eax
jl 0x4f12f5
inc eax
mov dword [ebp - 0x4dc], eax
mov dword [ebp - 0x484], 0
mov eax, dword [ebp - 0x470]
mov edx, dword [ebp - 0x484]
mov ax, word [eax + edx*2]
shr ax, 8
mov edx, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x484]
mov byte [edx + ecx*4 + 0x2a], al
mov eax, dword [ebp - 0x474]
mov edx, dword [ebp - 0x484]
mov ax, word [eax + edx*2]
shr ax, 8
mov edx, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x484]
mov byte [edx + ecx*4 + 0x29], al
mov eax, dword [ebp - 0x478]
mov edx, dword [ebp - 0x484]
mov ax, word [eax + edx*2]
shr ax, 8
mov edx, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x484]
mov byte [edx + ecx*4 + 0x28], al
inc dword [ebp - 0x484]
dec dword [ebp - 0x4dc]
jne 0x4f127b
cmp word [ebp - 0x45e], 0
je 0x4f1309
cmp word [ebp - 0x45e], 1
jne 0x4f1375
mov eax, dword [ebp - 0x4d0]
dec eax
test eax, eax
jl 0x4f1375
inc eax
mov dword [ebp - 0x4dc], eax
mov dword [ebp - 0x484], 0
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x484]
mov byte [eax + edx*4 + 0x2a], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x484]
mov byte [eax + edx*4 + 0x29], cl
mov eax, dword [ebp - 0x42c]
mov edx, dword [ebp - 0x484]
mov cl, byte [ebp - 0x484]
mov byte [eax + edx*4 + 0x28], cl
inc dword [ebp - 0x484]
dec dword [ebp - 0x4dc]
jne 0x4f1325
xor eax, eax
mov dword [ebp - 0x418], eax
call sub.USER32.DLL_GetFocus
mov dword [ebp - 0x420], eax
mov eax, dword [ebp - 0x420]
push eax
call sub.USER32.DLL_GetDC
mov dword [ebp - 0x418], eax
xor eax, eax
push ebp
push 0x4f19aa
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x434], eax
xor eax, eax
mov dword [ebp - 0x438], eax
xor eax, eax
mov dword [ebp - 0x424], eax
mov eax, dword [ebp - 0x438]
push eax
mov eax, dword [ebp - 0x434]
push eax
lea eax, [ebp - 0x424]
push eax
push 0
mov eax, dword [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x418]
push eax
call sub.GDI32.DLL_CreateDIBSection
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
je 0x4f1402
cmp dword [ebp - 0x424], 0
jne 0x4f1455
push 0
mov cx, word [0x4f1b20]
mov dl, 1
mov eax, 0x4f1bd8
call fcn.0044b300
mov eax, dword [ebp - 0x418]
push eax
push 0
call sub.USER32.DLL_ReleaseDC
mov eax, dword [ebp - 0x42c]
call fcn.004027ec
mov eax, dword [0x843bdc]
push eax
call fcn.004f5778
pop ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 0x414], eax
call fcn.0040396c
jmp 0x4f19bd
xor eax, eax
push ebp
push 0x4f196e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x843bdc]
push eax
call fcn.005039d8
pop ecx
call fcn.004027d4
mov dword [ebp - 0x490], eax
cmp byte [ebp - 0x4b7], 0
je 0x4f149c
mov eax, dword [0x843bdc]
push eax
call fcn.005039d8
pop ecx
add eax, eax
call fcn.004027d4
mov dword [ebp - 0x4c8], eax
cmp byte [ebp - 0x4b8], 0
je 0x4f14bf
mov eax, dword [0x843bdc]
push eax
call fcn.005039d8
pop ecx
shl eax, 3
call fcn.004027d4
mov dword [ebp - 0x4c8], eax
cmp byte [ebp - 0x4b9], 0
je 0x4f14e7
mov eax, dword [0x843bdc]
push eax
call fcn.005039d8
pop ecx
mov ecx, 3
cdq
idiv ecx
call fcn.004027d4
mov dword [ebp - 0x4c8], eax
mov eax, dword [0x843bdc]
push eax
call fcn.00503910
pop ecx
mov dword [ebp - 0x49c], eax
cmp dword [ebp - 0x45c], 1
jne 0x4f16cc
xor eax, eax
mov dword [ebp - 0x498], eax
mov eax, dword [ebp - 0x424]
mov dword [ebp - 0x428], eax
jmp 0x4f16a3
mov al, byte [ebp - 0x4b7]
or al, byte [ebp - 0x4b8]
je 0x4f15bd
mov eax, dword [ebp - 0x45c]
imul dword [ebp - 0x4cc]
push eax
mov eax, dword [ebp - 0x490]
push eax
mov eax, dword [ebp - 0x498]
push eax
mov eax, dword [0x843bdc]
push eax
call fcn.00502d8c
add esp, 0x10
cmp byte [ebp - 0x4b7], 0
je 0x4f1581
mov ecx, dword [ebp - 0x45c]
imul ecx, dword [ebp - 0x4cc]
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x490]
call fcn.004f07cc
cmp byte [ebp - 0x4b8], 0
je 0x4f15af
mov eax, dword [ebp - 0x4cc]
push eax
mov eax, dword [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x45c]
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x490]
call fcn.004f0830
mov eax, dword [ebp - 0x4c8]
mov dword [ebp - 0x494], eax
jmp 0x4f15f2
mov eax, dword [ebp - 0x490]
mov dword [ebp - 0x494], eax
mov eax, dword [ebp - 0x45c]
imul dword [ebp - 0x454]
push eax
mov eax, dword [ebp - 0x490]
push eax
mov eax, dword [ebp - 0x498]
push eax
mov eax, dword [0x843bdc]
push eax
call fcn.00502d8c
add esp, 0x10
cmp dword [ebp - 0x410], 1
jle 0x4f1662
mov eax, dword [ebp - 0x454]
cdq
idiv dword [ebp - 0x410]
dec eax
test eax, eax
jl 0x4f1654
inc eax
mov dword [ebp - 0x4dc], eax
mov dword [ebp - 0x484], 0
mov edx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x494]
mov ecx, 1
call fcn.00402a38
mov eax, dword [ebp - 0x410]
add dword [ebp - 0x494], eax
inc dword [ebp - 0x428]
inc dword [ebp - 0x484]
dec dword [ebp - 0x4dc]
jne 0x4f161e
mov eax, dword [ebp - 0x46c]
add dword [ebp - 0x428], eax
jmp 0x4f1697
mov edx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x494]
mov ecx, dword [ebp - 0x454]
call fcn.00402a38
mov eax, dword [ebp - 0x454]
add dword [ebp - 0x494], eax
mov eax, dword [ebp - 0x454]
add eax, dword [ebp - 0x46c]
add dword [ebp - 0x428], eax
mov eax, dword [ebp - 0x410]
add dword [ebp - 0x498], eax
mov eax, dword [ebp - 0x498]
cmp eax, dword [ebp - 0x4b4]
jge 0x4f1926
mov eax, dword [ebp - 0x498]
cmp eax, dword [ebp - 0x49c]
jl 0x4f151f
jmp 0x4f1926
xor eax, eax
mov dword [ebp - 0x468], eax
xor eax, eax
mov dword [ebp - 0x498], eax
mov eax, dword [ebp - 0x498]
imul dword [ebp - 0x45c]
inc eax
mov dword [ebp - 0x468], eax
mov eax, dword [ebp - 0x4b4]
cdq
idiv dword [ebp - 0x45c]
inc eax
mov dword [ebp - 0x4a0], eax
mov eax, dword [ebp - 0x424]
mov dword [ebp - 0x428], eax
jmp 0x4f1906
mov al, byte [ebp - 0x4b7]
or al, byte [ebp - 0x4b8]
jne 0x4f172f
cmp byte [ebp - 0x4b9], 0
je 0x4f17e9
mov eax, dword [ebp - 0x45c]
imul dword [ebp - 0x4cc]
push eax
mov eax, dword [ebp - 0x490]
push eax
mov eax, dword [ebp - 0x498]
push eax
mov eax, dword [0x843bdc]
push eax
call fcn.00502d8c
add esp, 0x10
cmp byte [ebp - 0x4b7], 0
je 0x4f177f
mov ecx, dword [ebp - 0x45c]
imul ecx, dword [ebp - 0x4cc]
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x490]
call fcn.004f07cc
cmp byte [ebp - 0x4b8], 0
je 0x4f17ad
mov eax, dword [ebp - 0x4cc]
push eax
mov eax, dword [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x45c]
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x490]
call fcn.004f0830
cmp byte [ebp - 0x4b9], 0
je 0x4f17db
mov eax, dword [ebp - 0x440]
push eax
mov ecx, dword [ebp - 0x45c]
imul ecx, dword [ebp - 0x454]
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ebp - 0x490]
call fcn.004f0754
mov eax, dword [ebp - 0x4c8]
mov dword [ebp - 0x494], eax
jmp 0x4f181e
mov eax, dword [ebp - 0x490]
mov dword [ebp - 0x494], eax
mov eax, dword [ebp - 0x45c]
imul dword [ebp - 0x454]
push eax
mov eax, dword [ebp - 0x490]
push eax
mov eax, dword [ebp - 0x498]
push eax
mov eax, dword [0x843bdc]
push eax
call fcn.00502d8c
add esp, 0x10
mov eax, dword [ebp - 0x45c]
dec eax
test eax, eax
jl 0x4f1900
inc eax
mov dword [ebp - 0x4dc], eax
mov dword [ebp - 0x488], 0
inc dword [ebp - 0x468]
cmp dword [ebp - 0x468], 0
jl 0x4f18ee
mov eax, dword [ebp - 0x4b4]
dec eax
cmp eax, dword [ebp - 0x468]
jl 0x4f18ee
mov eax, dword [ebp - 0x468]
cdq
idiv dword [ebp - 0x410]
test edx, edx
jne 0x4f18ee
mov eax, dword [ebp - 0x448]
imul dword [ebp - 0x410]
cmp eax, dword [ebp - 0x468]
jle 0x4f18ee
mov eax, dword [ebp - 0x454]
cdq
idiv dword [ebp - 0x410]
dec eax
test eax, eax
jl 0x4f18e2
inc eax
mov dword [ebp - 0x4e0], eax
mov dword [ebp - 0x484], 0
mov edx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x494]
mov ecx, 1
call fcn.00402a38
mov eax, dword [ebp - 0x410]
add dword [ebp - 0x494], eax
inc dword [ebp - 0x428]
inc dword [ebp - 0x484]
dec dword [ebp - 0x4e0]
jne 0x4f18ac
mov eax, dword [ebp - 0x46c]
add dword [ebp - 0x428], eax
inc dword [ebp - 0x488]
dec dword [ebp - 0x4dc]
jne 0x4f183e
inc dword [ebp - 0x498]
mov eax, dword [ebp - 0x498]
cmp eax, dword [ebp - 0x4a0]
jge 0x4f1926
mov eax, dword [ebp - 0x498]
cmp eax, dword [ebp - 0x49c]
jl 0x4f1714
mov eax, dword [ebp - 0x42c]
call fcn.004027ec
mov eax, dword [ebp - 0x490]
call fcn.004027ec
cmp byte [ebp - 0x4b7], 0
je 0x4f1950
mov eax, dword [ebp - 0x4c8]
call fcn.004027ec
cmp byte [ebp - 0x4b8], 0
je 0x4f1964
mov eax, dword [ebp - 0x4c8]
call fcn.004027ec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4f1989
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f19b1
mov eax, dword [ebp - 0x418]
push eax
mov eax, dword [ebp - 0x420]
push eax
call sub.USER32.DLL_ReleaseDC
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f19ed
lea eax, [ebp - 0xc28]
mov edx, 2
call fcn.00403e98
lea eax, [ebp - 0x40c]
call fcn.00403e74
ret